]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Fix new rubocop warnings
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2022-10-25 17:25:58 UTC using RuboCop version 1.37.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: 555
18 # This cop supports safe autocorrection (--autocorrect).
19 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
20 # URISchemes: http, https
21 Layout/LineLength:
22   Max: 248
23
24 # Offense count: 29
25 # Configuration parameters: AllowSafeAssignment.
26 Lint/AssignmentInCondition:
27   Exclude:
28     - 'app/controllers/accounts_controller.rb'
29     - 'app/controllers/api/traces_controller.rb'
30     - 'app/controllers/api/user_preferences_controller.rb'
31     - 'app/controllers/application_controller.rb'
32     - 'app/controllers/geocoder_controller.rb'
33     - 'app/controllers/notes_controller.rb'
34     - 'app/controllers/traces_controller.rb'
35     - 'app/controllers/users_controller.rb'
36     - 'app/helpers/application_helper.rb'
37     - 'app/helpers/browse_tags_helper.rb'
38     - 'app/mailers/user_mailer.rb'
39     - 'app/models/client_application.rb'
40     - 'lib/nominatim.rb'
41     - 'lib/osm.rb'
42     - 'script/deliver-message'
43
44 # Offense count: 676
45 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
46 Metrics/AbcSize:
47   Max: 189
48
49 # Offense count: 72
50 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
51 # AllowedMethods: refine
52 Metrics/BlockLength:
53   Max: 71
54
55 # Offense count: 15
56 # Configuration parameters: CountBlocks.
57 Metrics/BlockNesting:
58   Max: 5
59
60 # Offense count: 25
61 # Configuration parameters: CountComments, CountAsOne.
62 Metrics/ClassLength:
63   Max: 316
64
65 # Offense count: 58
66 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
67 Metrics/CyclomaticComplexity:
68   Max: 25
69
70 # Offense count: 751
71 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
72 Metrics/MethodLength:
73   Max: 179
74
75 # Offense count: 1
76 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
77 Metrics/ParameterLists:
78   Max: 6
79
80 # Offense count: 57
81 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
82 Metrics/PerceivedComplexity:
83   Max: 26
84
85 # Offense count: 559
86 Minitest/MultipleAssertions:
87   Max: 52
88
89 # Offense count: 1
90 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
91 # NamePrefix: is_, has_, have_
92 # ForbiddenPrefixes: is_, has_, have_
93 # AllowedMethods: is_a?
94 # MethodDefinitionMacros: define_method, define_singleton_method
95 Naming/PredicateName:
96   Exclude:
97     - 'app/models/user.rb'
98
99 # Offense count: 5
100 # Configuration parameters: Database, Include.
101 # SupportedDatabases: mysql, postgresql
102 # Include: db/migrate/*.rb
103 Rails/BulkChangeTable:
104   Exclude:
105     - 'db/migrate/20111116184519_update_oauth.rb'
106     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
107     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
108
109 # Offense count: 2
110 # Configuration parameters: Include.
111 # Include: app/models/**/*.rb
112 Rails/HasAndBelongsToMany:
113   Exclude:
114     - 'app/models/changeset.rb'
115     - 'app/models/user.rb'
116
117 # Offense count: 3
118 # Configuration parameters: Include.
119 # Include: app/helpers/**/*.rb
120 Rails/HelperInstanceVariable:
121   Exclude:
122     - 'app/helpers/title_helper.rb'
123
124 # Offense count: 16
125 # Configuration parameters: IgnoreScopes, Include.
126 # Include: app/models/**/*.rb
127 Rails/InverseOf:
128   Exclude:
129     - 'app/models/changeset.rb'
130     - 'app/models/diary_entry.rb'
131     - 'app/models/friendship.rb'
132     - 'app/models/issue.rb'
133     - 'app/models/message.rb'
134     - 'app/models/note.rb'
135     - 'app/models/user.rb'
136
137 # Offense count: 2
138 # Configuration parameters: Include.
139 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
140 Rails/LexicallyScopedActionFilter:
141   Exclude:
142     - 'app/controllers/oauth2_applications_controller.rb'
143     - 'app/controllers/oauth2_authorizations_controller.rb'
144
145 # Offense count: 5
146 # Configuration parameters: Include.
147 # Include: db/migrate/*.rb
148 Rails/NotNullColumn:
149   Exclude:
150     - 'db/migrate/002_cleanup_osm_db.rb'
151     - 'db/migrate/020_populate_node_tags_and_remove.rb'
152     - 'db/migrate/021_move_to_innodb.rb'
153     - 'db/migrate/025_add_end_time_to_changesets.rb'
154     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
155
156 # Offense count: 9
157 Rails/OutputSafety:
158   Exclude:
159     - 'app/controllers/sessions_controller.rb'
160     - 'app/controllers/users_controller.rb'
161     - 'app/helpers/application_helper.rb'
162     - 'lib/rich_text.rb'
163     - 'test/helpers/application_helper_test.rb'
164
165 # Offense count: 6
166 # This cop supports safe autocorrection (--autocorrect).
167 Rake/Desc:
168   Exclude:
169     - 'lib/tasks/auto_annotate_models.rake'
170     - 'lib/tasks/eslint.rake'
171     - 'lib/tasks/subscribe_diary_authors.rake'
172     - 'lib/tasks/subscribe_old_changesets.rake'
173
174 # Offense count: 625
175 # This cop supports unsafe autocorrection (--autocorrect-all).
176 # Configuration parameters: EnforcedStyle.
177 # SupportedStyles: always, always_true, never
178 Style/FrozenStringLiteralComment:
179   Enabled: false
180
181 # Offense count: 72
182 # This cop supports safe autocorrection (--autocorrect).
183 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
184 Style/NumericLiterals:
185   MinDigits: 15