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