-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Fix #9122] Added notification if any gems are loaded that have rubocop extensions. #9130
Conversation
/cc @bbatsov @tejasbubane |
I love the proposed design and I might even ship this with the release I've planned for later today, as I don't really have any concerns about it. It's actually better than what I had in mind, as originally I was thinking of mapping extensions to the presence of certain files/folders in the project. You came up with a granular and flexible configuration and I agree that something like this doesn't make sense for every formatter. I'm assuming in the unlikely event of a project with only a |
5e1696e
to
f8f3d13
Compare
@bbatsov thanks! My biggest worry is how to make this be useful without being spammy. I'll write up some documentation for it in the morning, thanks for the reminder! |
f8f3d13
to
0f4a30e
Compare
…e rubocop extensions. The notification can be disabled by setting `AllCops/SuggestExtensions: false`
0f4a30e
to
4174f6e
Compare
@bbatsov oh I was writing tests and documentation 😅 I'll open another PR |
The notification is output at the end, and only when using a few specified formatters that make sense to me. It is also disabled for CI and if some rubocop options are set that I didn't think it made sense to be included for (
--only
,--debug
,--list-target-files
and--out
(since this is possibly used for something programmatic, I didn't want to change it).The message looks like this:
I also wanted to have a way to disable it so that it doesn't end up being spammy to users who aren't interested, so it is configured by
AllCops/NotifyForExtensions
(which can either take a hash of extensions and gems, orfalse
). I did it this way so that someone could disable the notification for justrubocop-rake
for instance, if they're never planning on using it.I would love to discuss any choices I made and make any changes!
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.