]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/4319'
[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: 29
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 # This cop supports unsafe autocorrection (--autocorrect-all).
97 Rails/ActionControllerFlashBeforeRender:
98   Exclude:
99     - 'app/controllers/traces_controller.rb'
100
101 # Offense count: 5
102 # Configuration parameters: Database, Include.
103 # SupportedDatabases: mysql, postgresql
104 # Include: db/migrate/*.rb
105 Rails/BulkChangeTable:
106   Exclude:
107     - 'db/migrate/20111116184519_update_oauth.rb'
108     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
109     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
110
111 # Offense count: 2
112 # Configuration parameters: Include.
113 # Include: app/models/**/*.rb
114 Rails/HasAndBelongsToMany:
115   Exclude:
116     - 'app/models/changeset.rb'
117     - 'app/models/user.rb'
118
119 # Offense count: 3
120 # Configuration parameters: Include.
121 # Include: app/helpers/**/*.rb
122 Rails/HelperInstanceVariable:
123   Exclude:
124     - 'app/helpers/title_helper.rb'
125
126 # Offense count: 16
127 # Configuration parameters: IgnoreScopes, Include.
128 # Include: app/models/**/*.rb
129 Rails/InverseOf:
130   Exclude:
131     - 'app/models/changeset.rb'
132     - 'app/models/diary_entry.rb'
133     - 'app/models/friendship.rb'
134     - 'app/models/issue.rb'
135     - 'app/models/message.rb'
136     - 'app/models/note.rb'
137     - 'app/models/user.rb'
138
139 # Offense count: 2
140 # Configuration parameters: Include.
141 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
142 Rails/LexicallyScopedActionFilter:
143   Exclude:
144     - 'app/controllers/oauth2_applications_controller.rb'
145     - 'app/controllers/oauth2_authorizations_controller.rb'
146
147 # Offense count: 5
148 # Configuration parameters: Include.
149 # Include: db/migrate/*.rb
150 Rails/NotNullColumn:
151   Exclude:
152     - 'db/migrate/002_cleanup_osm_db.rb'
153     - 'db/migrate/020_populate_node_tags_and_remove.rb'
154     - 'db/migrate/021_move_to_innodb.rb'
155     - 'db/migrate/025_add_end_time_to_changesets.rb'
156     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
157
158 # Offense count: 7
159 Rails/OutputSafety:
160   Exclude:
161     - 'app/helpers/application_helper.rb'
162     - 'lib/rich_text.rb'
163     - 'test/helpers/application_helper_test.rb'
164
165 # Offense count: 16
166 # Configuration parameters: Include.
167 # Include: db/**/*.rb
168 Rails/ThreeStateBooleanColumn:
169   Exclude:
170     - 'db/migrate/001_create_osm_db.rb'
171     - 'db/migrate/006_tile_nodes.rb'
172     - 'db/migrate/007_add_relations.rb'
173     - 'db/migrate/054_refactor_map_bug_tables.rb'
174     - 'db/migrate/20140507110937_create_changeset_comments.rb'
175
176 # Offense count: 6
177 # This cop supports safe autocorrection (--autocorrect).
178 Rake/Desc:
179   Exclude:
180     - 'lib/tasks/auto_annotate_models.rake'
181     - 'lib/tasks/eslint.rake'
182     - 'lib/tasks/subscribe_diary_authors.rake'
183     - 'lib/tasks/subscribe_old_changesets.rake'
184
185 # Offense count: 632
186 # This cop supports unsafe autocorrection (--autocorrect-all).
187 # Configuration parameters: EnforcedStyle.
188 # SupportedStyles: always, always_true, never
189 Style/FrozenStringLiteralComment:
190   Enabled: false
191
192 # Offense count: 72
193 # This cop supports safe autocorrection (--autocorrect).
194 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
195 Style/NumericLiterals:
196   MinDigits: 15