Skip to content

Commit 0271c86

Browse files
committed
alphabetize and uniquify cop config in .rubocopy.yml
# Conflicts: # CHANGELOG.md
1 parent 85e7742 commit 0271c86

File tree

2 files changed

+44
-47
lines changed

2 files changed

+44
-47
lines changed

.rubocop.yml

Lines changed: 43 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,25 @@ AllCops:
1313
- 'gemfiles/*'
1414
TargetRubyVersion: 3.1
1515

16-
Metrics/BlockLength:
17-
Enabled: false
18-
19-
Metrics/MethodLength:
16+
Gemspec/DevelopmentDependencies:
2017
Exclude:
21-
- "lib/rubycritic/configuration.rb"
22-
23-
Layout/LineLength:
24-
Max: 120
25-
26-
Style/Documentation:
27-
Enabled: false
28-
29-
Style/HashSyntax:
30-
EnforcedShorthandSyntax: either
31-
32-
Security/MarshalLoad:
33-
Enabled: false
34-
Include:
35-
- 'lib/rubycritic/serializer.rb'
36-
37-
Style/RedundantFreeze:
38-
Enabled: false
39-
Include:
40-
- 'lib/rubycritic/core/smell.rb'
41-
- 'lib/rubycritic/generators/json/simple.rb'
42-
- 'lib/rubycritic/revision_comparator.rb'
43-
- 'lib/rubycritic/source_control_systems/perforce.rb'
44-
- 'lib/rubycritic/source_locator.rb'
45-
- 'lib/rubycritic/version.rb'
18+
- 'rubycritic.gemspec'
4619

4720
Layout/BlockAlignment:
4821
Enabled: false
4922
Exclude:
5023
- 'features/step_definitions/rake_task_steps.rb'
5124

52-
Naming/RescuedExceptionsVariableName:
53-
Exclude:
54-
- 'lib/rubycritic/analysers/coverage.rb'
55-
- 'lib/rubycritic/cli/application.rb'
56-
- 'lib/rubycritic/reporter.rb'
57-
58-
Lint/EmptyClass:
59-
Exclude:
60-
- 'test/lib/rubycritic/reporter_test.rb'
25+
Layout/LineLength:
26+
Max: 120
6127

6228
Lint/ConstantDefinitionInBlock:
6329
Exclude:
6430
- 'test/lib/rubycritic/reporter_test.rb'
6531

66-
Style/OpenStructUse:
32+
Lint/EmptyClass:
6733
Exclude:
68-
- 'test/lib/rubycritic/generators/turbulence_test.rb'
69-
- 'test/lib/rubycritic/generators/console_report_test.rb'
70-
- 'test/lib/rubycritic/core/analysed_module_test.rb'
71-
- 'test/analysers_test_helper.rb'
34+
- 'test/lib/rubycritic/reporter_test.rb'
7235

7336
Lint/MissingSuper:
7437
Exclude:
@@ -81,10 +44,6 @@ Lint/MissingSuper:
8144
- 'lib/rubycritic/generators/html/code_index.rb'
8245
- 'lib/rubycritic/generators/html/line.rb'
8346

84-
Gemspec/DevelopmentDependencies:
85-
Exclude:
86-
- 'rubycritic.gemspec'
87-
8847
Lint/StructNewOverride:
8948
Exclude:
9049
- 'lib/rubycritic/source_control_systems/git/churn.rb'
@@ -93,10 +52,47 @@ Metrics/AbcSize:
9352
Exclude:
9453
- 'lib/rubycritic/configuration.rb'
9554

55+
Metrics/BlockLength:
56+
Enabled: false
57+
9658
Metrics/MethodLength:
9759
Exclude:
9860
- 'lib/rubycritic/configuration.rb'
9961

62+
Naming/RescuedExceptionsVariableName:
63+
Exclude:
64+
- 'lib/rubycritic/analysers/coverage.rb'
65+
- 'lib/rubycritic/cli/application.rb'
66+
- 'lib/rubycritic/reporter.rb'
67+
68+
Security/MarshalLoad:
69+
Enabled: false
70+
Include:
71+
- 'lib/rubycritic/serializer.rb'
72+
73+
Style/Documentation:
74+
Enabled: false
75+
76+
Style/HashSyntax:
77+
EnforcedShorthandSyntax: either
78+
79+
Style/OpenStructUse:
80+
Exclude:
81+
- 'test/lib/rubycritic/generators/turbulence_test.rb'
82+
- 'test/lib/rubycritic/generators/console_report_test.rb'
83+
- 'test/lib/rubycritic/core/analysed_module_test.rb'
84+
- 'test/analysers_test_helper.rb'
85+
10086
Style/RedundantAssignment:
10187
Exclude:
10288
- 'lib/rubycritic/configuration.rb'
89+
90+
Style/RedundantFreeze:
91+
Enabled: false
92+
Include:
93+
- 'lib/rubycritic/core/smell.rb'
94+
- 'lib/rubycritic/generators/json/simple.rb'
95+
- 'lib/rubycritic/revision_comparator.rb'
96+
- 'lib/rubycritic/source_control_systems/perforce.rb'
97+
- 'lib/rubycritic/source_locator.rb'
98+
- 'lib/rubycritic/version.rb'

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* [CHORE] ...
66
* [FEATURE] ...
77

8+
* [CHORE] Sorted cops in .rubocop.yml to make it easier for maintainers to add or modify cop settings, and unified duplicate Metrics/MethodLength settings. (by [@faisal][])
89
* [CHANGE] Bump mocha dependency (by [@faisal][])
910
* [CHORE] Update CI checkout action to v6 (by [@faisal][]])
1011
* [CHORE] Uses prism instead of parser for Ruby 3.4 and above (by [@torresga][] and [@julioalucero][])

0 commit comments

Comments
 (0)