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