]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Merge remote-tracking branch 'upstream/pull/2490'
[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: 6
93 Naming/AccessorMethodName:
94   Exclude:
95     - 'app/controllers/application_controller.rb'
96     - 'app/helpers/title_helper.rb'
97     - 'app/models/old_way.rb'
98     - 'lib/osm.rb'
99     - 'lib/potlatch.rb'
100
101 # Offense count: 8
102 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
103 # NamePrefix: is_, has_, have_
104 # NamePrefixBlacklist: is_, has_, have_
105 # NameWhitelist: is_a?
106 # MethodDefinitionMacros: define_method, define_singleton_method
107 Naming/PredicateName:
108   Exclude:
109     - 'spec/**/*'
110     - 'app/models/changeset.rb'
111     - 'app/models/old_node.rb'
112     - 'app/models/old_relation.rb'
113     - 'app/models/old_way.rb'
114     - 'app/models/user.rb'
115     - 'lib/classic_pagination/pagination.rb'
116
117 # Offense count: 5
118 # Cop supports --auto-correct.
119 Performance/RegexpMatch:
120   Exclude:
121     - 'app/helpers/browse_tags_helper.rb'
122     - 'app/validators/characters_validator.rb'
123     - 'app/validators/whitespace_validator.rb'
124
125 # Offense count: 6
126 # Configuration parameters: Database, Include.
127 # SupportedDatabases: mysql, postgresql
128 # Include: db/migrate/*.rb
129 Rails/BulkChangeTable:
130   Exclude:
131     - 'db/migrate/20111116184519_update_oauth.rb'
132     - 'db/migrate/20120208122334_merge_acl_address_and_mask.rb'
133     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
134     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
135
136 # Offense count: 2
137 # Configuration parameters: Include.
138 # Include: app/models/**/*.rb
139 Rails/HasAndBelongsToMany:
140   Exclude:
141     - 'app/models/changeset.rb'
142     - 'app/models/user.rb'
143
144 # Offense count: 11
145 # Configuration parameters: Include.
146 # Include: app/helpers/**/*.rb
147 Rails/HelperInstanceVariable:
148   Exclude:
149     - 'app/helpers/application_helper.rb'
150     - 'app/helpers/title_helper.rb'
151     - 'app/helpers/trace_helper.rb'
152
153 # Offense count: 5
154 # Configuration parameters: Include.
155 # Include: db/migrate/*.rb
156 Rails/NotNullColumn:
157   Exclude:
158     - 'db/migrate/002_cleanup_osm_db.rb'
159     - 'db/migrate/020_populate_node_tags_and_remove.rb'
160     - 'db/migrate/021_move_to_innodb.rb'
161     - 'db/migrate/025_add_end_time_to_changesets.rb'
162     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
163
164 # Offense count: 18
165 Rails/OutputSafety:
166   Exclude:
167     - 'app/controllers/users_controller.rb'
168     - 'app/helpers/application_helper.rb'
169     - 'app/helpers/changesets_helper.rb'
170     - 'app/helpers/geocoder_helper.rb'
171     - 'app/helpers/note_helper.rb'
172     - 'app/helpers/open_graph_helper.rb'
173     - 'app/helpers/user_blocks_helper.rb'
174     - 'lib/rich_text.rb'
175     - 'test/helpers/application_helper_test.rb'
176
177 # Offense count: 94
178 # Cop supports --auto-correct.
179 # Configuration parameters: EnforcedStyle.
180 # SupportedStyles: strict, flexible
181 Rails/TimeZone:
182   Enabled: false
183
184 # Offense count: 1
185 # Configuration parameters: AllowedChars.
186 Style/AsciiComments:
187   Exclude:
188     - 'test/models/message_test.rb'
189
190 # Offense count: 27
191 # Configuration parameters: EnforcedStyle.
192 # SupportedStyles: annotated, template, unannotated
193 Style/FormatStringToken:
194   Exclude:
195     - 'app/models/concerns/geo_record.rb'
196     - 'app/views/api/map/_bounds.xml.builder'
197     - 'lib/bounding_box.rb'
198     - 'test/controllers/api/map_controller_test.rb'
199     - 'test/controllers/api/relations_controller_test.rb'
200     - 'test/controllers/api/ways_controller_test.rb'
201     - 'test/lib/bounding_box_test.rb'
202
203 # Offense count: 539
204 # Cop supports --auto-correct.
205 # Configuration parameters: EnforcedStyle.
206 # SupportedStyles: always, never
207 Style/FrozenStringLiteralComment:
208   Enabled: false
209
210 # Offense count: 2
211 # Cop supports --auto-correct.
212 Style/IfUnlessModifier:
213   Exclude:
214     - 'app/controllers/api/ways_controller.rb'
215
216 # Offense count: 70
217 # Cop supports --auto-correct.
218 # Configuration parameters: Strict.
219 Style/NumericLiterals:
220   MinDigits: 11