]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
ff5730cee243b41b0ea57c3d7afddb5d5e64b902
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2019-10-19 16:05:52 +0000 using RuboCop version 0.75.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
16 # Offense count: 3338
17 # Cop supports --auto-correct.
18 # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
19 # URISchemes: http, https
20 Layout/LineLength:
21   Max: 260
22
23 # Offense count: 35
24 # Configuration parameters: AllowSafeAssignment.
25 Lint/AssignmentInCondition:
26   Exclude:
27     - 'app/controllers/api/traces_controller.rb'
28     - 'app/controllers/api/user_preferences_controller.rb'
29     - 'app/controllers/application_controller.rb'
30     - 'app/controllers/geocoder_controller.rb'
31     - 'app/controllers/notes_controller.rb'
32     - 'app/controllers/traces_controller.rb'
33     - 'app/controllers/users_controller.rb'
34     - 'app/helpers/application_helper.rb'
35     - 'app/helpers/browse_tags_helper.rb'
36     - 'app/mailers/notifier.rb'
37     - 'app/models/client_application.rb'
38     - 'lib/nominatim.rb'
39     - 'lib/osm.rb'
40     - 'script/deliver-message'
41
42 # Offense count: 4
43 # Configuration parameters: AllowComments.
44 Lint/SuppressedException:
45   Exclude:
46     - 'app/controllers/api/amf_controller.rb'
47     - 'app/controllers/users_controller.rb'
48     - 'app/controllers/site_controller.rb'
49
50 # Offense count: 701
51 Metrics/AbcSize:
52   Max: 189
53
54 # Offense count: 39
55 # Configuration parameters: CountComments, ExcludedMethods.
56 # ExcludedMethods: refine
57 Metrics/BlockLength:
58   Max: 71
59
60 # Offense count: 15
61 # Configuration parameters: CountBlocks.
62 Metrics/BlockNesting:
63   Max: 5
64
65 # Offense count: 25
66 # Configuration parameters: CountComments.
67 Metrics/ClassLength:
68   Max: 645
69
70 # Offense count: 74
71 Metrics/CyclomaticComplexity:
72   Max: 22
73
74 # Offense count: 722
75 # Configuration parameters: CountComments, ExcludedMethods.
76 Metrics/MethodLength:
77   Max: 179
78
79 # Offense count: 2
80 # Configuration parameters: CountComments.
81 Metrics/ModuleLength:
82   Max: 117
83
84 # Offense count: 4
85 # Configuration parameters: CountKeywordArgs.
86 Metrics/ParameterLists:
87   Max: 9
88
89 # Offense count: 72
90 Metrics/PerceivedComplexity:
91   Max: 25
92
93 # Offense count: 2
94 # Cop supports --auto-correct.
95 Minitest/AssertEmpty:
96   Exclude:
97     - 'test/controllers/api/amf_controller_test.rb'
98
99 # Offense count: 6
100 # Cop supports --auto-correct.
101 Minitest/AssertEqual:
102   Exclude:
103     - 'test/controllers/api/amf_controller_test.rb'
104
105 # Offense count: 27
106 # Cop supports --auto-correct.
107 Minitest/AssertIncludes:
108   Exclude:
109     - 'test/controllers/api/amf_controller_test.rb'
110     - 'test/controllers/api/nodes_controller_test.rb'
111     - 'test/helpers/browse_helper_test.rb'
112     - 'test/lib/i18n_test.rb'
113     - 'test/models/node_test.rb'
114     - 'test/models/old_node_test.rb'
115     - 'test/models/user_test.rb'
116
117 # Offense count: 104
118 # Cop supports --auto-correct.
119 Minitest/AssertTruthy:
120   Enabled: false
121
122 # Offense count: 110
123 # Cop supports --auto-correct.
124 Minitest/RefuteFalse:
125   Enabled: false
126
127 # Offense count: 6
128 Naming/AccessorMethodName:
129   Exclude:
130     - 'app/controllers/application_controller.rb'
131     - 'app/helpers/title_helper.rb'
132     - 'app/models/old_way.rb'
133     - 'lib/osm.rb'
134     - 'lib/potlatch.rb'
135
136 # Offense count: 8
137 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
138 # NamePrefix: is_, has_, have_
139 # NamePrefixBlacklist: is_, has_, have_
140 # NameWhitelist: is_a?
141 # MethodDefinitionMacros: define_method, define_singleton_method
142 Naming/PredicateName:
143   Exclude:
144     - 'spec/**/*'
145     - 'app/models/changeset.rb'
146     - 'app/models/old_node.rb'
147     - 'app/models/old_relation.rb'
148     - 'app/models/old_way.rb'
149     - 'app/models/user.rb'
150     - 'lib/classic_pagination/pagination.rb'
151
152 # Offense count: 5
153 # Cop supports --auto-correct.
154 Performance/RegexpMatch:
155   Exclude:
156     - 'app/helpers/browse_tags_helper.rb'
157     - 'app/validators/characters_validator.rb'
158     - 'app/validators/whitespace_validator.rb'
159
160 # Offense count: 6
161 # Configuration parameters: Database, Include.
162 # SupportedDatabases: mysql, postgresql
163 # Include: db/migrate/*.rb
164 Rails/BulkChangeTable:
165   Exclude:
166     - 'db/migrate/20111116184519_update_oauth.rb'
167     - 'db/migrate/20120208122334_merge_acl_address_and_mask.rb'
168     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
169     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
170
171 # Offense count: 2
172 # Configuration parameters: Include.
173 # Include: app/models/**/*.rb
174 Rails/HasAndBelongsToMany:
175   Exclude:
176     - 'app/models/changeset.rb'
177     - 'app/models/user.rb'
178
179 # Offense count: 11
180 # Configuration parameters: Include.
181 # Include: app/helpers/**/*.rb
182 Rails/HelperInstanceVariable:
183   Exclude:
184     - 'app/helpers/application_helper.rb'
185     - 'app/helpers/title_helper.rb'
186     - 'app/helpers/trace_helper.rb'
187
188 # Offense count: 5
189 # Configuration parameters: Include.
190 # Include: db/migrate/*.rb
191 Rails/NotNullColumn:
192   Exclude:
193     - 'db/migrate/002_cleanup_osm_db.rb'
194     - 'db/migrate/020_populate_node_tags_and_remove.rb'
195     - 'db/migrate/021_move_to_innodb.rb'
196     - 'db/migrate/025_add_end_time_to_changesets.rb'
197     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
198
199 # Offense count: 18
200 Rails/OutputSafety:
201   Exclude:
202     - 'app/controllers/users_controller.rb'
203     - 'app/helpers/application_helper.rb'
204     - 'app/helpers/changesets_helper.rb'
205     - 'app/helpers/geocoder_helper.rb'
206     - 'app/helpers/note_helper.rb'
207     - 'app/helpers/open_graph_helper.rb'
208     - 'app/helpers/user_blocks_helper.rb'
209     - 'lib/rich_text.rb'
210     - 'test/helpers/application_helper_test.rb'
211
212 # Offense count: 94
213 # Cop supports --auto-correct.
214 # Configuration parameters: EnforcedStyle.
215 # SupportedStyles: strict, flexible
216 Rails/TimeZone:
217   Enabled: false
218
219 # Offense count: 1
220 # Configuration parameters: AllowedChars.
221 Style/AsciiComments:
222   Exclude:
223     - 'test/models/message_test.rb'
224
225 # Offense count: 27
226 # Configuration parameters: EnforcedStyle.
227 # SupportedStyles: annotated, template, unannotated
228 Style/FormatStringToken:
229   Exclude:
230     - 'app/models/concerns/geo_record.rb'
231     - 'app/views/api/map/_bounds.xml.builder'
232     - 'lib/bounding_box.rb'
233     - 'test/controllers/api/map_controller_test.rb'
234     - 'test/controllers/api/relations_controller_test.rb'
235     - 'test/controllers/api/ways_controller_test.rb'
236     - 'test/lib/bounding_box_test.rb'
237
238 # Offense count: 539
239 # Cop supports --auto-correct.
240 # Configuration parameters: EnforcedStyle.
241 # SupportedStyles: always, never
242 Style/FrozenStringLiteralComment:
243   Enabled: false
244
245 # Offense count: 2
246 # Cop supports --auto-correct.
247 Style/IfUnlessModifier:
248   Exclude:
249     - 'app/controllers/api/ways_controller.rb'
250
251 # Offense count: 70
252 # Cop supports --auto-correct.
253 # Configuration parameters: Strict.
254 Style/NumericLiterals:
255   MinDigits: 11