Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

danger-ikr-xcode_summary

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger-ikr-xcode_summary

  • 1.2.4
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

danger-xcode_summary

License Gem Version Build Status

A Danger plugin that shows all build errors, warnings and unit tests results generated from xcodebuild.

How does it look?

1 Error
🚫 MyWeightTests.MyWeightTests: testError, failed - :w:
MyWeightTests/MyWeightTests.swift#L26
2 Warnings
⚠️ MyWeight/ViewController.swift#L35: initialization of immutable value ‘bla’ was never used; consider replacing with assignment to ‘_’ or removing it
let bla = "unused variable"
⚠️ Bla.m#L32: Value stored to ‘theme’ is never read
theme = *ptr++;

Installation

Add this line to your Gemfile:

gem 'danger-xcode_summary'

Usage

Just add this line to your Dangerfile:

xcode_summary.report 'MyApp.xcresult'

You need to pass the path of the xcresult generated after compiling your app. By default, this is inside the DerivedData for your project, but you can use the -resultBundlePath flag when calling xcodebuild to customize its path. You can read more about it in this blog post from the folks at PSPDFKit.

You can also ignore warnings from certain files by setting ignored_files: Warning: ignored_files patterns applied on relative paths.

# Ignoring warnings from Pods
xcode_summary.ignored_files = 'Pods/**'

# Ignoring specific warnings
xcode_summary.ignored_results { |result|
  result.message.include? 'ld' # Ignore ld_warnings
}

xcode_summary.report 'MyApp.xcresult'

You can use ignores_warnings to supress warnings and shows only errors.

xcode_summary.ignores_warnings = true

You can use inline_mode. When this value is enabled, each warnings and errors are commented on each lines.

# Comment on each lines
xcode_summary.inline_mode = true
xcode_summary.report 'MyApp.xcresult'

You can use strict to reporting errors as warnings thereby don't block merge PR.

# If value is `false`, then errors will be reporting as warnings
xcode_summary.strict = false

You can get warning and error number by calling warning_error_count. The return will be a JSON string contains warning and error count, e.g {"warnings":1,"errors":3}:

result = xcode_summary.warning_error_count 'MyApp.xcresult'

License

danger-xcode_summary is released under the MIT license. See LICENSE.txt for details.

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.

FAQs

Package last updated on 13 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc