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
RuboCop warns "The following cops were added to RuboCop, but are not configured." #7771
Comments
Well, the message tells you what you need to do - either mark those cops as enabled or disabled in your config. Check the documentation link from the message for more details. |
Why is this necessary now? My config only adjusts a couple cops. Shouldn't those cops be enabled/disabled in a default config inside RuboCop? |
@roberts1000 new cops are introduced this way so you can take your decision on what to do with them. If they were enabled by default they might break your integration; if they weren't you might never notice them. |
Related issue: rubocop/rubocop#7771 We should enable these cops until we have a good reason not to.
Related issue: rubocop/rubocop#7771 We should enable these cops until we have a good reason not to.
Yes, I had the same for the cop |
I've read the documentation here: https://docs.rubocop.org/en/latest/versioning/, but still am not clear on a couple things.
|
Yes. 1.0 is pretty close, btw. Even the next release might 1.0 as far as I'm concerned. Wanted to do a bit more for it, but given the current situation we'll probably scale back the plans.
There won't a warning then. If you enabled something explicitly RuboCop doesn't care whether it's enabled by default or not. |
Thanks @bbatsov. And thanks for all your work on this gem. |
+/- Same issue here, Cop was just started ignoring all errors but showing the popup in VScode. this after working flawless for a long time. Fixed it by deleting the rubocop.yml, uninstalling and re-installing the rubocop vscode plugin |
Is there a setting to auto-enable all pending cops without having to add them individually to my config (basically bring back the old behavior)? |
@swrobel Not yet, but we'll likely add this pretty soon. |
Well, meanwhile, there kind of is a way : AllCops:
EnabledByDefault: true I requires some work on your configuration, as you have to manually disable all cops that are disabled by default. We took this opportunity to make a big review and enable a few more cops. |
I'm missing consistency here. I bumped from 0.80 to 0.81 and got the following message:
so I see there are two new cops in version 0.81 but changelog https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md#0810-2020-04-01 says there are 4 new cops.. so why don't we have all four listed in the output notice?
This is simply confusing. |
Btw. before rubocop 0.80.1 we could minimize our rubocop configuration to only some exceptions to what's enabled and set by default. It was convenient, helped to follow the community rules, keep the configuration small etc. This change forces us to keep extending our project rubocop configuration, which over time will make it more and more complex. Is it what you'd like to have in your projects? I read that this change was introduced because some ppl complained about failing CI builds after a rubocop upgrade. Maybe this is not the full picture but from my point of view you can always disable a new cop or re-generate rubocop_todo - it's just part of the upgrade job. Some bugfixes might also break CI but are not disabled by default like new cops. I don't get what's the point of this feature - to help someone do an upgrade without the upgrade? If someone is not ready to do an upgrade or has no time to work on it, he/she should simply not do it and that's it. To recap: I'm sorry but I'm not a fan of this change. Fortunately there's a way to bring back the old strategy by adding:
which I'd make default |
oh wait..
though https://docs.rubocop.org/en/latest/versioning suggests adding
so what am I doing wrong? Yet another confusion :/
works as expected. |
@madlew please dial it back. This is not a support forum; this is the issue tracker for an OSS project. I realize you're experiencing frustration with a (free) tool that you depend on (as was I) but there are productive (as well as unproductive) ways to go about expressing that. The rubocop team has worked very quickly to resolve this (kudos @koic!) A quick skim of the changelog reveals that the |
My intention was to help by sharing feedback about a user (probably not only mine) experience. and btw. you don't have to convince me that the rubocop team is doing great job. |
@madlew seriously, this project is so well-documented, if you would just take a second to do the research for yourself instead of continuing to ask here, you could easily find the answer! I'm going to stop spamming everyone on this thread, so this will be my last response. |
Seems we made a mistake and enabled a couple of cops by accident. Sorry about that! |
This now works with rubocop 0.83.0. |
When I load https://docs.rubocop.org/en/latest/versioning/ I get a 404 - "Page Not Found". not sure if this is the right place to note that issue or not. apologies if it is not. |
@jmbuscemi We recently migrated the docs to a different system and this changed the URLs. Now it's https://docs.rubocop.org/rubocop/0.85/versioning.html |
@bbatsov Thank you very much! I'm on 0.84 so that probably explains why the link is using the old URL. |
Yeah, exactly. We did the transition to the new system together with the release of 0.85. |
Also maybe useful for other people: You can use the flag Source: |
That's also in the docs for pending cops, btw - https://docs.rubocop.org/rubocop/versioning.html#enablingdisabling-pending-cops-in-bulk |
The problem I am having with this is that I use warnings as errors, this fails my builds and source control hooks, could it be an INFO not a WARNING? |
When I run RuboCop 0.80.1 I get the following output:
Expected behavior
I expected the output to not include a warning about missing configuration.
Actual behavior
See the above output.
Steps to reproduce the problem
Install RuboCop 0.80.1 and execute
rubocop
. I have a .rubocop.yml file in my project. It has a bunch of configuration in it, but the contents don't seem to matter. If I comment-out everything in the file, I still get the above output. However, if I rename .rubocop.yml to .rubocop.yml.bak and run, the warning output goes away.RuboCop version
The text was updated successfully, but these errors were encountered: