Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flix-tech/danger-code_style_validation
Danger plugin for code style validation based on clang-format
https://github.com/flix-tech/danger-code_style_validation
clang-format danger danger-plugin
Last synced: 1 day ago
JSON representation
Danger plugin for code style validation based on clang-format
- Host: GitHub
- URL: https://github.com/flix-tech/danger-code_style_validation
- Owner: flix-tech
- License: mit
- Created: 2017-03-20T09:53:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:24:17.000Z (almost 2 years ago)
- Last Synced: 2024-11-12T05:37:05.508Z (about 1 month ago)
- Topics: clang-format, danger, danger-plugin
- Language: Ruby
- Size: 142 KB
- Stars: 21
- Watchers: 7
- Forks: 8
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-danger - danger-code_style_validation - Danger plugin for code style validation based on clang-format. (Plugins / Ruby (danger))
README
# danger-code_style_validation
[![Build Status](https://travis-ci.org/flix-tech/danger-code_style_validation.svg?branch=master)](https://travis-ci.org/flix-tech/danger-code_style_validation)
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](/doc/images/example.png)
## Installation
Add the following string to your Gemfile:
```ruby
gem 'danger-code_style_validation', :git => 'https://github.com/flix-tech/danger-code_style_validation.git'
```## Usage
Inside your `Dangerfile` :
```ruby
code_style_validation.check
```To check files with extensions other than the default ones:
```ruby
code_style_validation.check file_extensions: ['.hpp', '.cpp']
```To ignore specific paths, use `ignore_file_patterns` :
```ruby
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.