-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion feature #48
Conversation
awesome. can be interesting to upstream the |
@mgrachev @adnikiforov I'd be glad if you'd review this when you have time. 🙏 |
@ohbarye I'm sorry for the long answer. I was on vacation. Thank you for your contribution! Please resolve a conflict 🙏 |
Also, please fix all rubocop warnings and disable them |
1f41cce
to
2c47d1c
Compare
…_formmater. Because those files are intended to include offenses for testing of rdjson_formatter. https://github.com/reviewdog/action-rubocop/pull/48/checks?check_run_id=3444136464
2c47d1c
to
c637e7f
Compare
@mgrachev |
@ohbarye Thanks a lot for your help 💚 |
@mgrachev Thank you for your review too! 👏 |
Issue
closes #28
Changes
This pull request adds a feature to make the reviewdog create a comment with a suggestion. Like below:
Here's an example pull request to utilize the feature: ohbarye/rubocop-suggestion-example#4
Design
First, I added
RdjsonFormatter
class in Ruby so that rubocop gets able to generate rdformat JSON. I followed some instructions to implement a new formatter, e.g. https://docs.rubocop.org/rubocop/formatters.html, https://www.rubydoc.info/gems/rubocop/RuboCop/Formatter/BaseFormatter.Second, I added a test for
RdjsonFormatter
. I just followed the way of https://github.com/reviewdog/action-eslint. Add test data, shell script, and CI setting.