Swiftpack.co - Package - thii/xcbeautify

xcbeautify Build Status

xcbeautify is a little beautifier tool for xcodebuild.

Similar to xcpretty, but faster.

Features

  • ☑ 2x faster than xcpretty.
  • ☑ Human-friendly and colored output.
  • ☑ Supports the new build system's output.
  • ☑ Supports Xcode's parallel testing output.
  • ☑ Supports formatting Swift Package Manager output.
  • ☑ Supports formatting Bazel output.
  • ☑ Supports macOS & Linux.
  • ☑ Written in Swift: xcbeautify compiles to a static binary which you can bring anywhere. This also means less Ruby-dependant in your development environment and CI.

Note: xcbeautify does not support generating JUnit or HTML test reports. In fact, you shouldn't rely on xcodebuild's output to generate test reports. We suggest using trainer or XCTestHTMLReport to generate test reports from xcodebuild's generated TestSummaries.plist files.

Fun fact

xcbeautify uses itself to format its CI build logs.

Installation

If you use macOS 10.14.3 or earlier, install Swift 5 Runtime Support for Command Line Tools first:

brew cask install thii/swift-runtime/swift-runtime

Homebrew

brew tap thii/xcbeautify https://github.com/thii/xcbeautify.git
brew install xcbeautify

Swiftbrew

swift brew install thii/xcbeautify

Mint

mint install thii/xcbeautify

CocoaPods

pod 'xcbeautify'

The xcbeautify binary will be installed at Pods/xcbeautify/xcbeautify

Build from source

git clone https://github.com/thii/xcbeautify.git
cd xcbeautify
make install

Usage

xcodebuild [flags] | xcbeautify

If you want xcbeautify to exit with the same status code as xcodebuild (e.g. on a CI):

set -o pipefail && xcodebuild [flags] | xcbeautify

For parallel and concurrent destination testing, it helps to use unbuffered I/O for stdout and to redirect stderr to stdout.

NSUnbufferedIO=YES xcodebuild [flags] 2>&1 | xcbeautify

Parse Bazel's building and testing output:

set -o pipefail && bazel build //path/to/package:target 2>&1 | xcbeautify
set -o pipefail && bazel test //path/to/package:target 2>&1 | xcbeautify

Future work

  • ☐ Write more tests

Development

Generate Xcode project:

make xcode

Build with Bazel:

bazel build //Sources/xcbeautify

Release a new version, say x.y.z:

make release version=x.y.z

Contributing

Just send a PR! We don't bite ;)

Don't have a GitHub account or prefer old-school patching via email? Send your patch to the project's mailing list.

License

MIT

Github

link
Stars: 294

Used By

Total: 2

Releases

0.8.1 - 2020-08-23 23:34:31

  • Added --is-ci option to output test result under --quiet or --quieter flag (#39) @kinwahlai

0.8.0 - 2020-05-26 02:31:39

  • Added --quieter option to suppress warnings (#37) @jakub-gonet

0.7.6 - 2020-05-14 09:17:01

  • Added support for parsing warnings and errors from Bazel build output (#35) @thii

0.7.5 - 2020-03-09 01:15:10

  • Fixed ProcessPCH++ not parsed and incorrect captured content for processPchCommand (#32) @greensky01

0.7.4 - 2020-02-21 11:46:07

  • Added support for undefined symbol location warnings (#31) @kingslay

0.7.3 - 2020-01-19 09:13:49

  • Failing tests are no longer being masked by the "--quiet" flag. (#29) @cobbal

0.7.2 - 2019-12-23 14:08:15

  • Fixed Xcode 11.3 output (#28) @greensky01

0.7.1 - 2019-12-21 05:23:46

Changes

  • Fixed shell command matcher hiding UI test failures (#26) @cobbal

0.7.0 - 2019-12-09 00:03:07

Changes

  • Fixed parsing of Xcode 11.1 and above's outputs (#24) @thii
  • Fixed log parsing for certain outputs for SwiftPM CLI on Linux (#21) @cyberbeni
  • Bumped Swift tools version to 5.0 (#21) @cyberbeni

0.6.0 - 2019-09-16 22:38:31

Changes

  • Parallel & Concurrent Destination Testing (#16) @chriszielinski

0.5.0 - 2019-07-27 05:08:11

Changes

  • Display a banner and warning or error in the quiet mode (#15) @greensky01
  • Support filtering out ouput that aren't warnings and errors (#14) @thii

0.4.4 - 2019-06-29 15:10:41

Changes

  • Remove backslashes before whitespaces in script build phases (#12) @guillaumealgis

0.4.3 - 2019-06-16 06:23:09

  • Fix bottling error on macOS High Sierra.

0.4.2 - 2019-06-16 00:03:21

Changes

  • Support building with Swift 4 (#10) @thii

0.4.1 - 2019-04-17 08:24:56

0.4.0 - 2019-04-17 04:09:05

  • Reduces binary size.
  • This version requires macOS Mojave 10.14.4 or above.

0.3.8 - 2019-04-07 00:42:50

  • Improves performance significantly. Thanks @brennantaylor!

This is the last version that supports macOS 10.14.3 and below.

0.3.7 - 2019-02-04 14:15:08

Mint 🌱 - 2018-12-14 00:17:16

  • Fixes an issue when installs xcbeautify using Mint (#3). Thanks @yonaskolb!

0.3.5 - 2018-10-18 13:21:41

  • Fixes crash when parsing PBXCp commands (#1). Thanks @vborodav!
  • Improves format of other AnalyzeShallow and ProcessPCH.

0.3.4 - 2018-10-14 15:33:27

0.3.3 - 2018-10-14 07:54:02

0.3.2 - 2018-10-14 01:34:38

  • Fixes crash when parsing compileStoryboard line

0.3.1 - 2018-09-17 15:12:48

  • Fixes format of Ld.

0.3.0 - 2018-09-16 15:57:42

  • Improves format of GenerateDSYMFile and Libtool.

0.2.1 - 2018-09-15 14:34:46

  • Minor bug fixes.

0.2.0: Xcode 10 - 2018-09-15 14:17:18

  • Drops support for Xcode 9. If you're using Xcode 9, xcpretty still works great.
  • Improves parsing output.

0.1.0: First release - 2018-09-10 16:14:57

First release 🚀