]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Fix new erblint warnings
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2021-06-29 17:25:37 UTC using RuboCop version 1.18.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: 510
18 # Cop supports --auto-correct.
19 # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
20 # URISchemes: http, https
21 Layout/LineLength:
22   Max: 270
23
24 # Offense count: 34
25 # Configuration parameters: AllowSafeAssignment.
26 Lint/AssignmentInCondition:
27   Exclude:
28     - 'app/controllers/api/traces_controller.rb'
29     - 'app/controllers/api/user_preferences_controller.rb'
30     - 'app/controllers/application_controller.rb'
31     - 'app/controllers/geocoder_controller.rb'
32     - 'app/controllers/notes_controller.rb'
33     - 'app/controllers/traces_controller.rb'
34     - 'app/controllers/users_controller.rb'
35     - 'app/helpers/application_helper.rb'
36     - 'app/helpers/browse_tags_helper.rb'
37     - 'app/mailers/user_mailer.rb'
38     - 'app/models/client_application.rb'
39     - 'lib/nominatim.rb'
40     - 'lib/osm.rb'
41     - 'script/deliver-message'
42
43 # Offense count: 8
44 # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
45 Lint/DuplicateBranch:
46   Exclude:
47     - 'app/controllers/api_controller.rb'
48     - 'app/controllers/diary_entries_controller.rb'
49     - 'app/controllers/geocoder_controller.rb'
50     - 'app/helpers/browse_tags_helper.rb'
51     - 'lib/password_hash.rb'
52
53 # Offense count: 631
54 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
55 Metrics/AbcSize:
56   Max: 235
57
58 # Offense count: 68
59 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
60 # IgnoredMethods: refine
61 Metrics/BlockLength:
62   Max: 71
63
64 # Offense count: 15
65 # Configuration parameters: CountBlocks.
66 Metrics/BlockNesting:
67   Max: 5
68
69 # Offense count: 25
70 # Configuration parameters: CountComments, CountAsOne.
71 Metrics/ClassLength:
72   Max: 361
73
74 # Offense count: 56
75 # Configuration parameters: IgnoredMethods.
76 Metrics/CyclomaticComplexity:
77   Max: 25
78
79 # Offense count: 703
80 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
81 Metrics/MethodLength:
82   Max: 179
83
84 # Offense count: 1
85 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
86 Metrics/ParameterLists:
87   Max: 6
88
89 # Offense count: 60
90 # Configuration parameters: IgnoredMethods.
91 Metrics/PerceivedComplexity:
92   Max: 26
93
94 # Offense count: 519
95 Minitest/MultipleAssertions:
96   Max: 88
97
98 # Offense count: 4
99 Naming/AccessorMethodName:
100   Exclude:
101     - 'app/controllers/application_controller.rb'
102     - 'app/helpers/title_helper.rb'
103     - 'lib/osm.rb'
104
105 # Offense count: 21
106 # Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms.
107 Naming/InclusiveLanguage:
108   Exclude:
109     - 'app/controllers/sessions_controller.rb'
110     - 'app/controllers/users_controller.rb'
111     - 'app/helpers/browse_tags_helper.rb'
112     - 'app/views/api/capabilities/show.builder'
113     - 'app/views/confirmations/_resend_success_flash.html.erb'
114     - 'app/views/users/blocked.html.erb'
115     - 'app/views/users/suspended.html.erb'
116     - 'config/environments/production.rb'
117     - 'config/initializers/canonical_rails.rb'
118     - 'config/initializers/config.rb'
119     - 'config/initializers/doorkeeper.rb'
120     - 'test/integration/user_login_test.rb'
121
122 # Offense count: 8
123 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
124 # NamePrefix: is_, has_, have_
125 # ForbiddenPrefixes: is_, has_, have_
126 # AllowedMethods: is_a?
127 # MethodDefinitionMacros: define_method, define_singleton_method
128 Naming/PredicateName:
129   Exclude:
130     - 'app/models/changeset.rb'
131     - 'app/models/old_node.rb'
132     - 'app/models/old_relation.rb'
133     - 'app/models/old_way.rb'
134     - 'app/models/user.rb'
135     - 'lib/classic_pagination/pagination.rb'
136
137 # Offense count: 5
138 # Configuration parameters: Database, Include.
139 # SupportedDatabases: mysql, postgresql
140 # Include: db/migrate/*.rb
141 Rails/BulkChangeTable:
142   Exclude:
143     - 'db/migrate/20111116184519_update_oauth.rb'
144     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
145     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
146
147 # Offense count: 2
148 # Configuration parameters: Include.
149 # Include: app/models/**/*.rb
150 Rails/HasAndBelongsToMany:
151   Exclude:
152     - 'app/models/changeset.rb'
153     - 'app/models/user.rb'
154
155 # Offense count: 3
156 # Configuration parameters: Include.
157 # Include: app/helpers/**/*.rb
158 Rails/HelperInstanceVariable:
159   Exclude:
160     - 'app/helpers/title_helper.rb'
161
162 # Offense count: 1
163 # Configuration parameters: Include.
164 # Include: app/controllers/**/*.rb
165 Rails/LexicallyScopedActionFilter:
166   Exclude:
167     - 'app/controllers/oauth2_applications_controller.rb'
168
169 # Offense count: 5
170 # Configuration parameters: Include.
171 # Include: db/migrate/*.rb
172 Rails/NotNullColumn:
173   Exclude:
174     - 'db/migrate/002_cleanup_osm_db.rb'
175     - 'db/migrate/020_populate_node_tags_and_remove.rb'
176     - 'db/migrate/021_move_to_innodb.rb'
177     - 'db/migrate/025_add_end_time_to_changesets.rb'
178     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
179
180 # Offense count: 9
181 Rails/OutputSafety:
182   Exclude:
183     - 'app/controllers/sessions_controller.rb'
184     - 'app/controllers/users_controller.rb'
185     - 'app/helpers/application_helper.rb'
186     - 'lib/rich_text.rb'
187     - 'test/helpers/application_helper_test.rb'
188
189 # Offense count: 91
190 # Cop supports --auto-correct.
191 # Configuration parameters: EnforcedStyle.
192 # SupportedStyles: strict, flexible
193 Rails/TimeZone:
194   Enabled: false
195
196 # Offense count: 6
197 # Cop supports --auto-correct.
198 Rake/Desc:
199   Exclude:
200     - 'lib/tasks/auto_annotate_models.rake'
201     - 'lib/tasks/eslint.rake'
202     - 'lib/tasks/subscribe_diary_authors.rake'
203     - 'lib/tasks/subscribe_old_changesets.rake'
204
205 # Offense count: 597
206 # Cop supports --auto-correct.
207 # Configuration parameters: EnforcedStyle.
208 # SupportedStyles: always, always_true, never
209 Style/FrozenStringLiteralComment:
210   Enabled: false
211
212 # Offense count: 73
213 # Cop supports --auto-correct.
214 # Configuration parameters: Strict.
215 Style/NumericLiterals:
216   MinDigits: 15