]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Switch to using 'rails test:all' in documentation and CI
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2021-01-11 19:00:54 UTC using RuboCop version 1.8.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: 544
18 # Cop supports --auto-correct.
19 # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
20 # URISchemes: http, https
21 Layout/LineLength:
22   Max: 254
23
24 # Offense count: 36
25 # Configuration parameters: AllowSafeAssignment.
26 Lint/AssignmentInCondition:
27   Exclude:
28     - 'app/controllers/api/traces_controller.rb'
29     - 'app/controllers/api/user_preferences_controller.rb'
30     - 'app/controllers/application_controller.rb'
31     - 'app/controllers/geocoder_controller.rb'
32     - 'app/controllers/notes_controller.rb'
33     - 'app/controllers/traces_controller.rb'
34     - 'app/controllers/users_controller.rb'
35     - 'app/helpers/application_helper.rb'
36     - 'app/helpers/browse_tags_helper.rb'
37     - 'app/mailers/user_mailer.rb'
38     - 'app/models/client_application.rb'
39     - 'lib/nominatim.rb'
40     - 'lib/osm.rb'
41     - 'script/deliver-message'
42
43 # Offense count: 8
44 # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
45 Lint/DuplicateBranch:
46   Exclude:
47     - 'app/controllers/api_controller.rb'
48     - 'app/controllers/diary_entries_controller.rb'
49     - 'app/controllers/geocoder_controller.rb'
50     - 'app/helpers/browse_tags_helper.rb'
51     - 'lib/password_hash.rb'
52
53 # Offense count: 487
54 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
55 Metrics/AbcSize:
56   Max: 235
57
58 # Offense count: 62
59 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
60 # IgnoredMethods: refine
61 Metrics/BlockLength:
62   Max: 71
63
64 # Offense count: 15
65 # Configuration parameters: CountBlocks.
66 Metrics/BlockNesting:
67   Max: 5
68
69 # Offense count: 24
70 # Configuration parameters: CountComments, CountAsOne.
71 Metrics/ClassLength:
72   Max: 587
73
74 # Offense count: 52
75 # Configuration parameters: IgnoredMethods.
76 Metrics/CyclomaticComplexity:
77   Max: 26
78
79 # Offense count: 553
80 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
81 Metrics/MethodLength:
82   Max: 179
83
84 # Offense count: 1
85 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
86 Metrics/ParameterLists:
87   Max: 6
88
89 # Offense count: 56
90 # Configuration parameters: IgnoredMethods.
91 Metrics/PerceivedComplexity:
92   Max: 26
93
94 # Offense count: 365
95 Minitest/MultipleAssertions:
96   Max: 97
97
98 # Offense count: 4
99 Naming/AccessorMethodName:
100   Exclude:
101     - 'app/controllers/application_controller.rb'
102     - 'app/helpers/title_helper.rb'
103     - 'lib/osm.rb'
104
105 # Offense count: 8
106 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
107 # NamePrefix: is_, has_, have_
108 # ForbiddenPrefixes: is_, has_, have_
109 # AllowedMethods: is_a?
110 # MethodDefinitionMacros: define_method, define_singleton_method
111 Naming/PredicateName:
112   Exclude:
113     - 'app/models/changeset.rb'
114     - 'app/models/old_node.rb'
115     - 'app/models/old_relation.rb'
116     - 'app/models/old_way.rb'
117     - 'app/models/user.rb'
118     - 'lib/classic_pagination/pagination.rb'
119
120 # Offense count: 5
121 # Configuration parameters: Database, Include.
122 # SupportedDatabases: mysql, postgresql
123 # Include: db/migrate/*.rb
124 Rails/BulkChangeTable:
125   Exclude:
126     - 'db/migrate/20111116184519_update_oauth.rb'
127     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
128     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
129
130 # Offense count: 2
131 # Configuration parameters: Include.
132 # Include: app/models/**/*.rb
133 Rails/HasAndBelongsToMany:
134   Exclude:
135     - 'app/models/changeset.rb'
136     - 'app/models/user.rb'
137
138 # Offense count: 3
139 # Configuration parameters: Include.
140 # Include: app/helpers/**/*.rb
141 Rails/HelperInstanceVariable:
142   Exclude:
143     - 'app/helpers/title_helper.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: 8
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: 80
166 # Cop supports --auto-correct.
167 # Configuration parameters: EnforcedStyle.
168 # SupportedStyles: strict, flexible
169 Rails/TimeZone:
170   Enabled: false
171
172 # Offense count: 8
173 Rake/Desc:
174   Exclude:
175     - 'lib/tasks/auto_annotate_models.rake'
176     - 'lib/tasks/eslint.rake'
177     - 'lib/tasks/subscribe_diary_authors.rake'
178     - 'lib/tasks/subscribe_old_changesets.rake'
179     - 'lib/tasks/testing.rake'
180
181 # Offense count: 558
182 # Cop supports --auto-correct.
183 # Configuration parameters: EnforcedStyle.
184 # SupportedStyles: always, always_true, never
185 Style/FrozenStringLiteralComment:
186   Enabled: false
187
188 # Offense count: 54
189 # Cop supports --auto-correct.
190 # Configuration parameters: Strict.
191 Style/NumericLiterals:
192   MinDigits: 15