]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Localisation updates from https://translatewiki.net.
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2021-12-28 19:44:27 UTC using RuboCop version 1.24.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: 544
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/accounts_controller.rb'
42     - 'app/controllers/api/traces_controller.rb'
43     - 'app/controllers/api/user_preferences_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: 7
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
66 # Offense count: 663
67 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
68 Metrics/AbcSize:
69   Max: 189
70
71 # Offense count: 72
72 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
73 # IgnoredMethods: refine
74 Metrics/BlockLength:
75   Max: 71
76
77 # Offense count: 15
78 # Configuration parameters: CountBlocks.
79 Metrics/BlockNesting:
80   Max: 5
81
82 # Offense count: 25
83 # Configuration parameters: CountComments, CountAsOne.
84 Metrics/ClassLength:
85   Max: 313
86
87 # Offense count: 57
88 # Configuration parameters: IgnoredMethods.
89 Metrics/CyclomaticComplexity:
90   Max: 25
91
92 # Offense count: 739
93 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
94 Metrics/MethodLength:
95   Max: 179
96
97 # Offense count: 1
98 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
99 Metrics/ParameterLists:
100   Max: 6
101
102 # Offense count: 59
103 # Configuration parameters: IgnoredMethods.
104 Metrics/PerceivedComplexity:
105   Max: 26
106
107 # Offense count: 549
108 Minitest/MultipleAssertions:
109   Max: 52
110
111 # Offense count: 3
112 Naming/AccessorMethodName:
113   Exclude:
114     - 'app/controllers/application_controller.rb'
115     - 'app/helpers/title_helper.rb'
116     - 'lib/osm.rb'
117
118 # Offense count: 8
119 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
120 # NamePrefix: is_, has_, have_
121 # ForbiddenPrefixes: is_, has_, have_
122 # AllowedMethods: is_a?
123 # MethodDefinitionMacros: define_method, define_singleton_method
124 Naming/PredicateName:
125   Exclude:
126     - 'app/models/changeset.rb'
127     - 'app/models/old_node.rb'
128     - 'app/models/old_relation.rb'
129     - 'app/models/old_way.rb'
130     - 'app/models/user.rb'
131     - 'lib/classic_pagination/pagination.rb'
132
133 # Offense count: 2
134 # Cop supports --auto-correct.
135 Performance/StringIdentifierArgument:
136   Exclude:
137     - 'test/controllers/accounts_controller_test.rb'
138
139 # Offense count: 5
140 # Configuration parameters: Database, Include.
141 # SupportedDatabases: mysql, postgresql
142 # Include: db/migrate/*.rb
143 Rails/BulkChangeTable:
144   Exclude:
145     - 'db/migrate/20111116184519_update_oauth.rb'
146     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
147     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
148
149 # Offense count: 2
150 # Configuration parameters: Include.
151 # Include: app/models/**/*.rb
152 Rails/HasAndBelongsToMany:
153   Exclude:
154     - 'app/models/changeset.rb'
155     - 'app/models/user.rb'
156
157 # Offense count: 3
158 # Configuration parameters: Include.
159 # Include: app/helpers/**/*.rb
160 Rails/HelperInstanceVariable:
161   Exclude:
162     - 'app/helpers/title_helper.rb'
163
164 # Offense count: 1
165 # Configuration parameters: Include.
166 # Include: app/controllers/**/*.rb
167 Rails/LexicallyScopedActionFilter:
168   Exclude:
169     - 'app/controllers/oauth2_applications_controller.rb'
170
171 # Offense count: 5
172 # Configuration parameters: Include.
173 # Include: db/migrate/*.rb
174 Rails/NotNullColumn:
175   Exclude:
176     - 'db/migrate/002_cleanup_osm_db.rb'
177     - 'db/migrate/020_populate_node_tags_and_remove.rb'
178     - 'db/migrate/021_move_to_innodb.rb'
179     - 'db/migrate/025_add_end_time_to_changesets.rb'
180     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
181
182 # Offense count: 9
183 Rails/OutputSafety:
184   Exclude:
185     - 'app/controllers/sessions_controller.rb'
186     - 'app/controllers/users_controller.rb'
187     - 'app/helpers/application_helper.rb'
188     - 'lib/rich_text.rb'
189     - 'test/helpers/application_helper_test.rb'
190
191 # Offense count: 23
192 # Cop supports --auto-correct.
193 Rails/RedundantPresenceValidationOnBelongsTo:
194   Enabled: false
195
196 # Offense count: 90
197 # Cop supports --auto-correct.
198 # Configuration parameters: EnforcedStyle.
199 # SupportedStyles: strict, flexible
200 Rails/TimeZone:
201   Enabled: false
202
203 # Offense count: 6
204 # Cop supports --auto-correct.
205 Rake/Desc:
206   Exclude:
207     - 'lib/tasks/auto_annotate_models.rake'
208     - 'lib/tasks/eslint.rake'
209     - 'lib/tasks/subscribe_diary_authors.rake'
210     - 'lib/tasks/subscribe_old_changesets.rake'
211
212 # Offense count: 609
213 # Cop supports --auto-correct.
214 # Configuration parameters: EnforcedStyle.
215 # SupportedStyles: always, always_true, never
216 Style/FrozenStringLiteralComment:
217   Enabled: false
218
219 # Offense count: 72
220 # Cop supports --auto-correct.
221 # Configuration parameters: Strict, AllowedNumbers.
222 Style/NumericLiterals:
223   MinDigits: 15