]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/4095'
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2023-04-11 16:47:05 UTC using RuboCop version 1.50.0.
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: 557
18 # This cop supports safe autocorrection (--autocorrect).
19 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
20 # URISchemes: http, https
21 Layout/LineLength:
22   Max: 248
23
24 # Offense count: 29
25 # This cop supports unsafe autocorrection (--autocorrect-all).
26 # Configuration parameters: AllowSafeAssignment.
27 Lint/AssignmentInCondition:
28   Exclude:
29     - 'app/controllers/accounts_controller.rb'
30     - 'app/controllers/api/traces_controller.rb'
31     - 'app/controllers/api/user_preferences_controller.rb'
32     - 'app/controllers/application_controller.rb'
33     - 'app/controllers/geocoder_controller.rb'
34     - 'app/controllers/notes_controller.rb'
35     - 'app/controllers/traces_controller.rb'
36     - 'app/controllers/users_controller.rb'
37     - 'app/helpers/application_helper.rb'
38     - 'app/helpers/browse_tags_helper.rb'
39     - 'app/mailers/user_mailer.rb'
40     - 'app/models/client_application.rb'
41     - 'lib/nominatim.rb'
42     - 'lib/osm.rb'
43     - 'script/deliver-message'
44
45 # Offense count: 680
46 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
47 Metrics/AbcSize:
48   Max: 189
49
50 # Offense count: 73
51 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
52 # AllowedMethods: refine
53 Metrics/BlockLength:
54   Max: 71
55
56 # Offense count: 20
57 # Configuration parameters: CountBlocks.
58 Metrics/BlockNesting:
59   Max: 5
60
61 # Offense count: 26
62 # Configuration parameters: CountComments, CountAsOne.
63 Metrics/ClassLength:
64   Max: 285
65
66 # Offense count: 59
67 # Configuration parameters: AllowedMethods, AllowedPatterns.
68 Metrics/CyclomaticComplexity:
69   Max: 26
70
71 # Offense count: 753
72 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
73 Metrics/MethodLength:
74   Max: 179
75
76 # Offense count: 1
77 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
78 Metrics/ParameterLists:
79   Max: 6
80
81 # Offense count: 56
82 # Configuration parameters: AllowedMethods, AllowedPatterns.
83 Metrics/PerceivedComplexity:
84   Max: 27
85
86 # Offense count: 2394
87 # This cop supports safe autocorrection (--autocorrect).
88 Minitest/EmptyLineBeforeAssertionMethods:
89   Enabled: false
90
91 # Offense count: 565
92 Minitest/MultipleAssertions:
93   Max: 54
94
95 # Offense count: 1
96 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
97 # NamePrefix: is_, has_, have_
98 # ForbiddenPrefixes: is_, has_, have_
99 # AllowedMethods: is_a?
100 # MethodDefinitionMacros: define_method, define_singleton_method
101 Naming/PredicateName:
102   Exclude:
103     - 'app/models/user.rb'
104
105 # Offense count: 1
106 # This cop supports unsafe autocorrection (--autocorrect-all).
107 Rails/ActionControllerFlashBeforeRender:
108   Exclude:
109     - 'app/controllers/traces_controller.rb'
110
111 # Offense count: 5
112 # Configuration parameters: Database, Include.
113 # SupportedDatabases: mysql, postgresql
114 # Include: db/migrate/*.rb
115 Rails/BulkChangeTable:
116   Exclude:
117     - 'db/migrate/20111116184519_update_oauth.rb'
118     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
119     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.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: 16
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: 2
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     - 'app/controllers/oauth2_authorizations_controller.rb'
156
157 # Offense count: 5
158 # Configuration parameters: Include.
159 # Include: db/migrate/*.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: 632
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: 72
203 # This cop supports safe autocorrection (--autocorrect).
204 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
205 Style/NumericLiterals:
206   MinDigits: 15