]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/2912' into master
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2020-09-02 06:16:56 UTC using RuboCop version 0.90.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: 568
17 # Cop supports --auto-correct.
18 # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
19 # URISchemes: http, https
20 Layout/LineLength:
21   Max: 370
22
23 # Offense count: 36
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/user_mailer.rb'
37     - 'app/models/client_application.rb'
38     - 'lib/nominatim.rb'
39     - 'lib/osm.rb'
40     - 'script/deliver-message'
41
42 # Offense count: 682
43 # Configuration parameters: IgnoredMethods.
44 Metrics/AbcSize:
45   Max: 194
46
47 # Offense count: 72
48 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
49 # ExcludedMethods: refine
50 Metrics/BlockLength:
51   Max: 71
52
53 # Offense count: 15
54 # Configuration parameters: CountBlocks.
55 Metrics/BlockNesting:
56   Max: 5
57
58 # Offense count: 25
59 # Configuration parameters: CountComments, CountAsOne.
60 Metrics/ClassLength:
61   Max: 643
62
63 # Offense count: 68
64 # Configuration parameters: IgnoredMethods.
65 Metrics/CyclomaticComplexity:
66   Max: 26
67
68 # Offense count: 735
69 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
70 Metrics/MethodLength:
71   Max: 179
72
73 # Offense count: 4
74 # Configuration parameters: CountKeywordArgs.
75 Metrics/ParameterLists:
76   Max: 9
77
78 # Offense count: 69
79 # Configuration parameters: IgnoredMethods.
80 Metrics/PerceivedComplexity:
81   Max: 26
82
83 # Offense count: 540
84 Minitest/MultipleAssertions:
85   Max: 81
86
87 # Offense count: 26
88 # Cop supports --auto-correct.
89 Minitest/TestMethodName:
90   Exclude:
91     - 'test/abilities/api_capability_test.rb'
92     - 'test/controllers/api/nodes_controller_test.rb'
93     - 'test/controllers/api/old_nodes_controller_test.rb'
94     - 'test/controllers/api/relations_controller_test.rb'
95     - 'test/controllers/api/ways_controller_test.rb'
96     - 'test/helpers/browse_helper_test.rb'
97     - 'test/integration/client_applications_test.rb'
98     - 'test/integration/short_links_test.rb'
99     - 'test/integration/user_blocks_test.rb'
100     - 'test/integration/user_creation_test.rb'
101
102 # Offense count: 6
103 Naming/AccessorMethodName:
104   Exclude:
105     - 'app/controllers/application_controller.rb'
106     - 'app/helpers/title_helper.rb'
107     - 'app/models/old_way.rb'
108     - 'lib/osm.rb'
109     - 'lib/potlatch.rb'
110
111 # Offense count: 8
112 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
113 # NamePrefix: is_, has_, have_
114 # ForbiddenPrefixes: is_, has_, have_
115 # AllowedMethods: is_a?
116 # MethodDefinitionMacros: define_method, define_singleton_method
117 Naming/PredicateName:
118   Exclude:
119     - 'spec/**/*'
120     - 'app/models/changeset.rb'
121     - 'app/models/old_node.rb'
122     - 'app/models/old_relation.rb'
123     - 'app/models/old_way.rb'
124     - 'app/models/user.rb'
125     - 'lib/classic_pagination/pagination.rb'
126
127 # Offense count: 5
128 # Configuration parameters: Database, Include.
129 # SupportedDatabases: mysql, postgresql
130 # Include: db/migrate/*.rb
131 Rails/BulkChangeTable:
132   Exclude:
133     - 'db/migrate/20111116184519_update_oauth.rb'
134     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
135     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
136
137 # Offense count: 2
138 # Configuration parameters: Include.
139 # Include: app/models/**/*.rb
140 Rails/HasAndBelongsToMany:
141   Exclude:
142     - 'app/models/changeset.rb'
143     - 'app/models/user.rb'
144
145 # Offense count: 4
146 # Configuration parameters: Include.
147 # Include: app/helpers/**/*.rb
148 Rails/HelperInstanceVariable:
149   Exclude:
150     - 'app/helpers/title_helper.rb'
151
152 # Offense count: 5
153 # Configuration parameters: Include.
154 # Include: db/migrate/*.rb
155 Rails/NotNullColumn:
156   Exclude:
157     - 'db/migrate/002_cleanup_osm_db.rb'
158     - 'db/migrate/020_populate_node_tags_and_remove.rb'
159     - 'db/migrate/021_move_to_innodb.rb'
160     - 'db/migrate/025_add_end_time_to_changesets.rb'
161     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
162
163 # Offense count: 19
164 Rails/OutputSafety:
165   Exclude:
166     - 'app/controllers/users_controller.rb'
167     - 'app/helpers/application_helper.rb'
168     - 'app/helpers/changesets_helper.rb'
169     - 'app/helpers/geocoder_helper.rb'
170     - 'app/helpers/user_blocks_helper.rb'
171     - 'lib/rich_text.rb'
172     - 'test/helpers/application_helper_test.rb'
173
174 # Offense count: 95
175 # Cop supports --auto-correct.
176 # Configuration parameters: EnforcedStyle.
177 # SupportedStyles: strict, flexible
178 Rails/TimeZone:
179   Enabled: false
180
181 # Offense count: 572
182 # Cop supports --auto-correct.
183 # Configuration parameters: EnforcedStyle.
184 # SupportedStyles: always, always_true, never
185 Style/FrozenStringLiteralComment:
186   Enabled: false
187
188 # Offense count: 78
189 # Cop supports --auto-correct.
190 # Configuration parameters: Strict.
191 Style/NumericLiterals:
192   MinDigits: 11
193
194 # Offense count: 20
195 Style/OptionalBooleanParameter:
196   Exclude:
197     - 'app/controllers/api/notes_controller.rb'
198     - 'app/controllers/application_controller.rb'
199     - 'app/helpers/browse_helper.rb'
200     - 'app/models/changeset.rb'
201     - 'app/models/node.rb'
202     - 'app/models/relation.rb'
203     - 'app/models/trace.rb'
204     - 'app/models/tracepoint.rb'
205     - 'app/models/way.rb'
206     - 'test/models/diary_entry_test.rb'
207     - 'test/models/trace_test.rb'
208     - 'test/models/tracetag_test.rb'
209
210 # Offense count: 28
211 # Cop supports --auto-correct.
212 Style/StringConcatenation:
213   Enabled: false