Low commit activity in last 3 years
No release in over a year
Show Xcode warnings with Danger
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.2.10
~> 2.14
= 3.0.7
>= 0
~> 13.0
~> 3.4
>= 0

Runtime

 Project Readme

danger-xcode_warnings

Gem Version Build Status version License: MIT

A Danger plugin to format and show warnings from xcodebuild.

Sample

Features

  • Extract the compiler and linker warnings from the build log and format them for Danger
    • Both xcodebuild and xcpretty format are supported
  • Gather the build timing summary and show

Installation

gem install danger-xcode_warnings

Or using Bundler,

gem 'danger-xcode_warnings'

Usage

With xcodebuild

Firstly, collect the log from xcodebuild.

xcodebuild clean build -workspace ... > build.log
# If you want to show the log with xcpretty
xcodebuild clean build -workspace ... | tee build.log | xcpretty

And then, call analyze_file method in your Dangerfile to analyze the build log,

xcode_warnings.analyze_file 'build.log'

with some shell scripts with your CI, like:

bundle install
bundle exec danger

With xcpretty

If you want to analyze the xcpretty log, you MUST set the use_xcpretty flag in your Dangerfile:

xcode_warnings.use_xcpretty = true
xcode_warnings.analyze_file 'build.log'

Your build script for CI should be like,

xcodebuild clean build -workspace ... | xcpretty > build.log

Show linker warnings

To show linker warnings, set the show_linker_warnings to true before analyzing the log:

xcode_warnings.show_linker_warnings = true
xcode_warnings.analyze_file 'build.log'

Gathering build timing sumamry

To gather the build timing summary, you have to add -showBuildTimingSummary option to your build script:

xcodebuild clean build -workspace ... -showBuildTimingSummary > build.log

Then, set the build_timing_summary flag to true.

xcode_warnings.build_timing_summary = true
xcode_warnings.analyze_file 'build.log'

See also

RubyDoc for this plugin is here:

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.