]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/5238'
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2024-08-27 18:01:13 UTC using RuboCop version 1.65.1.
4 # The point is for the user to remove these configuration records
5 # one by one as the offenses are removed from the code base.
6 # Note that changes in the inspected code, or installation of new
7 # versions of RuboCop, may require this file to be generated again.
8
9 # Work around erblint issues.
10 # https://github.com/openstreetmap/openstreetmap-website/issues/2472
11 require:
12   - rubocop-minitest
13   - rubocop-performance
14   - rubocop-rails
15   - rubocop-rake
16
17 # Offense count: 13
18 # Configuration parameters: Include, MaxAmount.
19 # Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
20 FactoryBot/ExcessiveCreateList:
21   Exclude:
22     - 'test/controllers/api/changeset_comments_controller_test.rb'
23     - 'test/controllers/api/messages_controller_test.rb'
24     - 'test/controllers/changesets_controller_test.rb'
25     - 'test/controllers/diary_entries_controller_test.rb'
26     - 'test/controllers/notes_controller_test.rb'
27     - 'test/controllers/traces_controller_test.rb'
28     - 'test/controllers/user_blocks_controller_test.rb'
29     - 'test/system/users_test.rb'
30
31 # Offense count: 635
32 # This cop supports safe autocorrection (--autocorrect).
33 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
34 # URISchemes: http, https
35 Layout/LineLength:
36   Max: 234
37
38 # Offense count: 23
39 # This cop supports unsafe autocorrection (--autocorrect-all).
40 # Configuration parameters: AllowSafeAssignment.
41 Lint/AssignmentInCondition:
42   Exclude:
43     - 'app/controllers/accounts_controller.rb'
44     - 'app/controllers/api/traces_controller.rb'
45     - 'app/controllers/api/user_preferences_controller.rb'
46     - 'app/controllers/geocoder_controller.rb'
47     - 'app/controllers/traces_controller.rb'
48     - 'app/controllers/users_controller.rb'
49     - 'app/helpers/application_helper.rb'
50     - 'app/helpers/browse_tags_helper.rb'
51     - 'app/mailers/user_mailer.rb'
52     - 'app/models/client_application.rb'
53     - 'lib/nominatim.rb'
54     - 'lib/osm.rb'
55     - 'script/deliver-message'
56
57 # Offense count: 762
58 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
59 Metrics/AbcSize:
60   Max: 189
61
62 # Offense count: 37
63 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
64 # AllowedMethods: refine
65 Metrics/BlockLength:
66   Max: 71
67
68 # Offense count: 8
69 # Configuration parameters: CountBlocks, CountModifierForms.
70 Metrics/BlockNesting:
71   Max: 5
72
73 # Offense count: 26
74 # Configuration parameters: CountComments, CountAsOne.
75 Metrics/ClassLength:
76   Max: 309
77
78 # Offense count: 58
79 # Configuration parameters: AllowedMethods, AllowedPatterns.
80 Metrics/CyclomaticComplexity:
81   Max: 25
82
83 # Offense count: 844
84 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
85 Metrics/MethodLength:
86   Max: 179
87
88 # Offense count: 1
89 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
90 Metrics/ParameterLists:
91   Max: 6
92
93 # Offense count: 58
94 # Configuration parameters: AllowedMethods, AllowedPatterns.
95 Metrics/PerceivedComplexity:
96   Max: 26
97
98 # Offense count: 2784
99 # This cop supports safe autocorrection (--autocorrect).
100 Minitest/EmptyLineBeforeAssertionMethods:
101   Enabled: false
102
103 # Offense count: 695
104 Minitest/MultipleAssertions:
105   Max: 60
106
107 # Offense count: 10
108 # This cop supports unsafe autocorrection (--autocorrect-all).
109 Rails/ActionControllerFlashBeforeRender:
110   Exclude:
111     - 'app/controllers/application_controller.rb'
112     - 'app/controllers/confirmations_controller.rb'
113     - 'app/controllers/friendships_controller.rb'
114     - 'app/controllers/issue_comments_controller.rb'
115     - 'app/controllers/messages_controller.rb'
116     - 'app/controllers/passwords_controller.rb'
117     - 'app/controllers/traces_controller.rb'
118     - 'app/controllers/user_blocks_controller.rb'
119     - 'app/controllers/users_controller.rb'
120
121 # Offense count: 2
122 # Configuration parameters: Include.
123 # Include: app/models/**/*.rb
124 Rails/HasAndBelongsToMany:
125   Exclude:
126     - 'app/models/changeset.rb'
127     - 'app/models/user.rb'
128
129 # Offense count: 3
130 # Configuration parameters: Include.
131 # Include: app/helpers/**/*.rb
132 Rails/HelperInstanceVariable:
133   Exclude:
134     - 'app/helpers/title_helper.rb'
135
136 # Offense count: 17
137 # Configuration parameters: IgnoreScopes, Include.
138 # Include: app/models/**/*.rb
139 Rails/InverseOf:
140   Exclude:
141     - 'app/models/changeset.rb'
142     - 'app/models/diary_entry.rb'
143     - 'app/models/friendship.rb'
144     - 'app/models/issue.rb'
145     - 'app/models/message.rb'
146     - 'app/models/note.rb'
147     - 'app/models/user.rb'
148
149 # Offense count: 1
150 # Configuration parameters: Include.
151 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
152 Rails/LexicallyScopedActionFilter:
153   Exclude:
154     - 'app/controllers/oauth2_applications_controller.rb'
155
156 # Offense count: 5
157 # Configuration parameters: Database, Include.
158 # SupportedDatabases: mysql
159 # Include: db/**/*.rb
160 Rails/NotNullColumn:
161   Exclude:
162     - 'db/migrate/002_cleanup_osm_db.rb'
163     - 'db/migrate/020_populate_node_tags_and_remove.rb'
164     - 'db/migrate/021_move_to_innodb.rb'
165     - 'db/migrate/025_add_end_time_to_changesets.rb'
166     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
167
168 # Offense count: 7
169 Rails/OutputSafety:
170   Exclude:
171     - 'app/helpers/application_helper.rb'
172     - 'lib/rich_text.rb'
173     - 'test/helpers/application_helper_test.rb'
174
175 # Offense count: 16
176 # Configuration parameters: Include.
177 # Include: db/**/*.rb
178 Rails/ThreeStateBooleanColumn:
179   Exclude:
180     - 'db/migrate/001_create_osm_db.rb'
181     - 'db/migrate/006_tile_nodes.rb'
182     - 'db/migrate/007_add_relations.rb'
183     - 'db/migrate/054_refactor_map_bug_tables.rb'
184     - 'db/migrate/20140507110937_create_changeset_comments.rb'
185
186 # Offense count: 6
187 # This cop supports safe autocorrection (--autocorrect).
188 Rake/Desc:
189   Exclude:
190     - 'lib/tasks/auto_annotate_models.rake'
191     - 'lib/tasks/eslint.rake'
192     - 'lib/tasks/subscribe_diary_authors.rake'
193     - 'lib/tasks/subscribe_old_changesets.rake'
194
195 # Offense count: 712
196 # This cop supports unsafe autocorrection (--autocorrect-all).
197 # Configuration parameters: EnforcedStyle.
198 # SupportedStyles: always, always_true, never
199 Style/FrozenStringLiteralComment:
200   Enabled: false
201
202 # Offense count: 78
203 # This cop supports safe autocorrection (--autocorrect).
204 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
205 Style/NumericLiterals:
206   MinDigits: 15