https://github.com/r7kamura/danger-suggester
A Danger plug-in to suggest code changes through inline comments in pull requests.
https://github.com/r7kamura/danger-suggester
danger
Last synced: 10 months ago
JSON representation
A Danger plug-in to suggest code changes through inline comments in pull requests.
- Host: GitHub
- URL: https://github.com/r7kamura/danger-suggester
- Owner: r7kamura
- License: mit
- Created: 2018-11-14T08:22:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T22:56:48.000Z (about 7 years ago)
- Last Synced: 2024-12-10T05:51:41.901Z (over 1 year ago)
- Topics: danger
- Language: Ruby
- Size: 449 KB
- Stars: 68
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Danger::Suggester
[](https://circleci.com/gh/r7kamura/workflows/danger-suggester)
[](https://rubygems.org/gems/danger-suggester)
[](http://www.rubydoc.info/github/r7kamura/danger-suggester)
A [Danger](https://github.com/danger/danger) plug-in to suggest code changes through inline comments in pull requests.
Suggestions are calculated based on the results of `git diff`, so any code formatter like rubocop, prettier, go fmt, etc. can be used for this.
Note that there is a limitation that multi-line replacements cannot be suggested because GitHub's suggested changes™ doesn't support it.

## Requirements
- Ruby 2.2 or higher
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'danger-suggester'
```
And then execute:
```
bundle
```
Or install it yourself as:
```
gem install danger-suggester
```
## Usage
Add this line to your application's Dangerfile:
```ruby
suggester.suggest
```
And then execute `danger` after correcting code by your favorite code formatters.
- See [.circleci/config.yml](/.circleci/config.yml) for more detailed example.
- See https://github.com/danger/danger if you are new to Danger.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/r7kamura/danger-suggester.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).