]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/3868'
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2023-01-03 19:11:30 UTC using RuboCop version 1.42.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: 556
18 # This cop supports safe autocorrection (--autocorrect).
19 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
20 # URISchemes: http, https
21 Layout/LineLength:
22   Max: 248
23
24 # Offense count: 29
25 # This cop supports safe autocorrection (--autocorrect).
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: 681
46 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
47 Metrics/AbcSize:
48   Max: 189
49
50 # Offense count: 73
51 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
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: 25
62 # Configuration parameters: CountComments, CountAsOne.
63 Metrics/ClassLength:
64   Max: 316
65
66 # Offense count: 60
67 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
68 Metrics/CyclomaticComplexity:
69   Max: 26
70
71 # Offense count: 755
72 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
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: 57
82 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
83 Metrics/PerceivedComplexity:
84   Max: 27
85
86 # Offense count: 2513
87 # This cop supports safe autocorrection (--autocorrect).
88 Minitest/EmptyLineBeforeAssertionMethods:
89   Enabled: false
90
91 # Offense count: 564
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: 6
176 # This cop supports safe autocorrection (--autocorrect).
177 Rake/Desc:
178   Exclude:
179     - 'lib/tasks/auto_annotate_models.rake'
180     - 'lib/tasks/eslint.rake'
181     - 'lib/tasks/subscribe_diary_authors.rake'
182     - 'lib/tasks/subscribe_old_changesets.rake'
183
184 # Offense count: 631
185 # This cop supports unsafe autocorrection (--autocorrect-all).
186 # Configuration parameters: EnforcedStyle.
187 # SupportedStyles: always, always_true, never
188 Style/FrozenStringLiteralComment:
189   Enabled: false
190
191 # Offense count: 72
192 # This cop supports safe autocorrection (--autocorrect).
193 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
194 Style/NumericLiterals:
195   MinDigits: 15
196
197 # Offense count: 110
198 # This cop supports unsafe autocorrection (--autocorrect-all).
199 # Configuration parameters: .
200 # SupportedOperators: *, +, &, |, ^
201 Style/YodaExpression:
202   Enabled: false