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
Add cop metadata #721
Add cop metadata #721
Conversation
I’m not sure how to review this PR. |
Basically this just follows on what was done in Rubocop, so I guess someone else from @rubocop-hq/rubocop-core can take a look. Btw, we can use Safe and SafeAutocorrect without importing the versions, they are independent ;) |
Looks good to me! Great work! |
Ah, could you rebase please, to get the 2.6 builds running? |
1e9ec63
to
a2d8ea4
Compare
@Darhazer I think forgot to merge this. :-) |
I thought we had a few but I'd have to re-examine the cops to jog my memory. |
When this lands, we should add Also, i think it might be safe if we skipped blocks by default (which , btw, maybe we should consider making the default), but it's interesting because I wonder how many cops might be safe with certain options but not others. I wonder if there should ever be a system for safe under certain conditions (though I suspect that would add too much complexity). |
We should add RSpec/PredicateMatcher to the list of unsafe autocorrects as well. |
@Darhazer do you need some help on that one? I've heard on the grapevine that RuboCop 1.0 may be released this week! 🎉 |
@pirj I'm pretty sure he won't mind help. :-) |
1. Description 2. Enabled 3. Exclude 4. Styles 5. Versions 6. StyleGuide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The only problem I see is that the docs are still generated as markdown, instead of asciidoc, but that's an orthogonal problem. The rake task will have to be updated.
Thank you @pirj Now I can't approve it as I'm still the author 😂 |
I think that's a good idea. |
I'll merge while @bquorning is not looking :D |
👍 Or we can do a 2.0 release, bump the dependency to |
This is the foundation to support the planned RuboCop behaviors (currently only Safe and SafeAutocorrect affect the actual behavior).
As far as I know we don't have any cops that are unsafe by design, so I've just added the versions. Now we can start also mark cops as Safe: false or SafeAutocorrect: false
Before submitting the PR make sure the following are checked:
master
(if not - rebase it).Added tests.Added an entry to the changelog if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).