]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Rubocop autofix: ambiguous operator precedence
[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: 34
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: 665
45 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
46 Metrics/AbcSize:
47   Max: 189
48
49 # Offense count: 73
50 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
51 # IgnoredMethods: 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: 313
64
65 # Offense count: 58
66 # Configuration parameters: IgnoredMethods.
67 Metrics/CyclomaticComplexity:
68   Max: 25
69
70 # Offense count: 742
71 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, 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: 59
81 # Configuration parameters: IgnoredMethods.
82 Metrics/PerceivedComplexity:
83   Max: 26
84
85 # Offense count: 550
86 Minitest/MultipleAssertions:
87   Max: 52
88
89 # Offense count: 1
90 Naming/AccessorMethodName:
91   Exclude:
92     - 'app/helpers/title_helper.rb'
93
94 # Offense count: 8
95 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
96 # NamePrefix: is_, has_, have_
97 # ForbiddenPrefixes: is_, has_, have_
98 # AllowedMethods: is_a?
99 # MethodDefinitionMacros: define_method, define_singleton_method
100 Naming/PredicateName:
101   Exclude:
102     - 'app/models/user.rb'
103
104 # Offense count: 5
105 # Configuration parameters: Database, Include.
106 # SupportedDatabases: mysql, postgresql
107 # Include: db/migrate/*.rb
108 Rails/BulkChangeTable:
109   Exclude:
110     - 'db/migrate/20111116184519_update_oauth.rb'
111     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
112     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
113
114 # Offense count: 2
115 # Configuration parameters: Include.
116 # Include: app/models/**/*.rb
117 Rails/HasAndBelongsToMany:
118   Exclude:
119     - 'app/models/changeset.rb'
120     - 'app/models/user.rb'
121
122 # Offense count: 3
123 # Configuration parameters: Include.
124 # Include: app/helpers/**/*.rb
125 Rails/HelperInstanceVariable:
126   Exclude:
127     - 'app/helpers/title_helper.rb'
128
129 # Offense count: 16
130 # Configuration parameters: IgnoreScopes, Include.
131 # Include: app/models/**/*.rb
132 Rails/InverseOf:
133   Exclude:
134     - 'app/models/changeset.rb'
135     - 'app/models/diary_entry.rb'
136     - 'app/models/friendship.rb'
137     - 'app/models/issue.rb'
138     - 'app/models/message.rb'
139     - 'app/models/note.rb'
140     - 'app/models/user.rb'
141
142 # Offense count: 2
143 # Configuration parameters: Include.
144 # Include: app/controllers/**/*.rb
145 Rails/LexicallyScopedActionFilter:
146   Exclude:
147     - 'app/controllers/oauth2_applications_controller.rb'
148     - 'app/controllers/oauth2_authorizations_controller.rb'
149
150 # Offense count: 5
151 # Configuration parameters: Include.
152 # Include: db/migrate/*.rb
153 Rails/NotNullColumn:
154   Exclude:
155     - 'db/migrate/002_cleanup_osm_db.rb'
156     - 'db/migrate/020_populate_node_tags_and_remove.rb'
157     - 'db/migrate/021_move_to_innodb.rb'
158     - 'db/migrate/025_add_end_time_to_changesets.rb'
159     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
160
161 # Offense count: 9
162 Rails/OutputSafety:
163   Exclude:
164     - 'app/controllers/sessions_controller.rb'
165     - 'app/controllers/users_controller.rb'
166     - 'app/helpers/application_helper.rb'
167     - 'lib/rich_text.rb'
168     - 'test/helpers/application_helper_test.rb'
169
170 # Offense count: 6
171 # Cop supports --auto-correct.
172 Rake/Desc:
173   Exclude:
174     - 'lib/tasks/auto_annotate_models.rake'
175     - 'lib/tasks/eslint.rake'
176     - 'lib/tasks/subscribe_diary_authors.rake'
177     - 'lib/tasks/subscribe_old_changesets.rake'
178
179 # Offense count: 617
180 # Cop supports --auto-correct.
181 # Configuration parameters: EnforcedStyle.
182 # SupportedStyles: always, always_true, never
183 Style/FrozenStringLiteralComment:
184   Enabled: false
185
186 # Offense count: 72
187 # Cop supports --auto-correct.
188 # Configuration parameters: Strict, AllowedNumbers.
189 Style/NumericLiterals:
190   MinDigits: 15