Skip to content

Latest commit

 

History

History
executable file
·
46 lines (31 loc) · 1.18 KB

README.md

File metadata and controls

executable file
·
46 lines (31 loc) · 1.18 KB

danger-code_style_validation

Build Status

This plugin uses 'clang-format' to look for code style violations in added lines on the current MR / PR, and offers inline patches. By default only Objective-C files, with extensions .h, .m, and .mm are checked.

Example

Installation

Add the following string to your Gemfile:

gem 'danger-code_style_validation', :git => 'https://github.com/flix-tech/danger-code_style_validation.git'

Usage

Inside your Dangerfile :

code_style_validation.check

To check files with extensions other than the default ones:

code_style_validation.check file_extensions: ['.hpp', '.cpp']

To ignore specific paths, use ignore_file_patterns :

code_style_validation.check ignore_file_patterns: [/^Pods\//]

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.