]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Fix Lint/DuplicateBranch rubocop warnings
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2022-02-23 19:11:04 UTC using RuboCop version 1.25.1.
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: 550
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: 665
58 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
59 Metrics/AbcSize:
60   Max: 189
61
62 # Offense count: 73
63 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
64 # IgnoredMethods: refine
65 Metrics/BlockLength:
66   Max: 71
67
68 # Offense count: 15
69 # Configuration parameters: CountBlocks.
70 Metrics/BlockNesting:
71   Max: 5
72
73 # Offense count: 25
74 # Configuration parameters: CountComments, CountAsOne.
75 Metrics/ClassLength:
76   Max: 313
77
78 # Offense count: 58
79 # Configuration parameters: IgnoredMethods.
80 Metrics/CyclomaticComplexity:
81   Max: 25
82
83 # Offense count: 742
84 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
85 Metrics/MethodLength:
86   Max: 179
87
88 # Offense count: 1
89 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
90 Metrics/ParameterLists:
91   Max: 6
92
93 # Offense count: 59
94 # Configuration parameters: IgnoredMethods.
95 Metrics/PerceivedComplexity:
96   Max: 26
97
98 # Offense count: 550
99 Minitest/MultipleAssertions:
100   Max: 52
101
102 # Offense count: 3
103 Naming/AccessorMethodName:
104   Exclude:
105     - 'app/controllers/application_controller.rb'
106     - 'app/helpers/title_helper.rb'
107     - 'lib/osm.rb'
108
109 # Offense count: 8
110 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
111 # NamePrefix: is_, has_, have_
112 # ForbiddenPrefixes: is_, has_, have_
113 # AllowedMethods: is_a?
114 # MethodDefinitionMacros: define_method, define_singleton_method
115 Naming/PredicateName:
116   Exclude:
117     - 'app/models/user.rb'
118
119 # Offense count: 5
120 # Configuration parameters: Database, Include.
121 # SupportedDatabases: mysql, postgresql
122 # Include: db/migrate/*.rb
123 Rails/BulkChangeTable:
124   Exclude:
125     - 'db/migrate/20111116184519_update_oauth.rb'
126     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
127     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
128
129 # Offense count: 2
130 # Configuration parameters: Include.
131 # Include: app/models/**/*.rb
132 Rails/HasAndBelongsToMany:
133   Exclude:
134     - 'app/models/changeset.rb'
135     - 'app/models/user.rb'
136
137 # Offense count: 3
138 # Configuration parameters: Include.
139 # Include: app/helpers/**/*.rb
140 Rails/HelperInstanceVariable:
141   Exclude:
142     - 'app/helpers/title_helper.rb'
143
144 # Offense count: 16
145 # Configuration parameters: IgnoreScopes, Include.
146 # Include: app/models/**/*.rb
147 Rails/InverseOf:
148   Exclude:
149     - 'app/models/changeset.rb'
150     - 'app/models/diary_entry.rb'
151     - 'app/models/friendship.rb'
152     - 'app/models/issue.rb'
153     - 'app/models/message.rb'
154     - 'app/models/note.rb'
155     - 'app/models/user.rb'
156
157 # Offense count: 2
158 # Configuration parameters: Include.
159 # Include: app/controllers/**/*.rb
160 Rails/LexicallyScopedActionFilter:
161   Exclude:
162     - 'app/controllers/oauth2_applications_controller.rb'
163     - 'app/controllers/oauth2_authorizations_controller.rb'
164
165 # Offense count: 5
166 # Configuration parameters: Include.
167 # Include: db/migrate/*.rb
168 Rails/NotNullColumn:
169   Exclude:
170     - 'db/migrate/002_cleanup_osm_db.rb'
171     - 'db/migrate/020_populate_node_tags_and_remove.rb'
172     - 'db/migrate/021_move_to_innodb.rb'
173     - 'db/migrate/025_add_end_time_to_changesets.rb'
174     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
175
176 # Offense count: 9
177 Rails/OutputSafety:
178   Exclude:
179     - 'app/controllers/sessions_controller.rb'
180     - 'app/controllers/users_controller.rb'
181     - 'app/helpers/application_helper.rb'
182     - 'lib/rich_text.rb'
183     - 'test/helpers/application_helper_test.rb'
184
185 # Offense count: 6
186 # Cop supports --auto-correct.
187 Rake/Desc:
188   Exclude:
189     - 'lib/tasks/auto_annotate_models.rake'
190     - 'lib/tasks/eslint.rake'
191     - 'lib/tasks/subscribe_diary_authors.rake'
192     - 'lib/tasks/subscribe_old_changesets.rake'
193
194 # Offense count: 617
195 # Cop supports --auto-correct.
196 # Configuration parameters: EnforcedStyle.
197 # SupportedStyles: always, always_true, never
198 Style/FrozenStringLiteralComment:
199   Enabled: false
200
201 # Offense count: 72
202 # Cop supports --auto-correct.
203 # Configuration parameters: Strict, AllowedNumbers.
204 Style/NumericLiterals:
205   MinDigits: 15