-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
--auto-gen-config produces Metrics/LineLength twice if Metrics/LineLength is configured in .rubocop.yml #5228
Comments
I'll take a look. |
[Fix #5228] Beware of overridden LineLength:Max in auto-gen-config
This is still happening in Here is my require:
- rubocop-performance
- rubocop-minitest
- rubocop-rake
inherit_from: .rubocop_todo.yml
AllCops:
EnabledByDefault: true
Style/FrozenStringLiteralComment:
EnforcedStyle: always_true
SafeAutoCorrect: true
Style/AsciiComments:
Enabled: false
Style/MethodCallWithArgsParentheses:
Enabled: false
Style/StringHashKeys:
Enabled: false
Style/Copyright:
Enabled: false
Style/MissingElse:
Enabled: false
Style/InlineComment:
Enabled: false
Style/ImplicitRuntimeError:
Enabled: false
Style/ConstantVisibility:
Enabled: false
Style/ClassMethodsDefinitions:
Enabled: false
Lint/NumberConversion:
Enabled: false
Lint/ConstantResolution:
Enabled: false
Lint/ReturnInVoidContext:
Enabled: false
Layout/LineLength:
Max: 120
IgnoredPatterns:
- "^#.*$"
Layout/SingleLineBlockChain:
Enabled: false
Layout/MultilineAssignmentLayout:
Enabled: false
Layout/EmptyLineAfterMultilineCondition:
Enabled: false
Layout/RedundantLineBreak:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/ParameterLists:
Max: 10
Naming/VariableNumber:
Enabled: false |
I can reproduce the problem, but it only happens when the user configuration for |
I can confirm, if |
Expected behavior
Metrics/LineLength
should only be reported once in.rubocop_todo.yml
.Actual behavior
Metrics/LineLength
is reported twice. My guess is that this is because of the two-phase run in the newer rubocop version? It also only happens when.rubocop.yml
contains a configuration rule forMetrics/LineLength
.Steps to reproduce the problem
Run
rubocop --auto-gen-config
RuboCop version
The text was updated successfully, but these errors were encountered: