1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2023-01-03 19:11:30 UTC using RuboCop version 1.42.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.
9 # Work around erblint issues.
10 # https://github.com/openstreetmap/openstreetmap-website/issues/2472
18 # This cop supports safe autocorrection (--autocorrect).
19 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
20 # URISchemes: http, https
25 # This cop supports safe autocorrection (--autocorrect).
26 # Configuration parameters: AllowSafeAssignment.
27 Lint/AssignmentInCondition:
29 - 'app/controllers/accounts_controller.rb'
30 - 'app/controllers/api/traces_controller.rb'
31 - 'app/controllers/api/user_preferences_controller.rb'
32 - 'app/controllers/application_controller.rb'
33 - 'app/controllers/geocoder_controller.rb'
34 - 'app/controllers/notes_controller.rb'
35 - 'app/controllers/traces_controller.rb'
36 - 'app/controllers/users_controller.rb'
37 - 'app/helpers/application_helper.rb'
38 - 'app/helpers/browse_tags_helper.rb'
39 - 'app/mailers/user_mailer.rb'
40 - 'app/models/client_application.rb'
43 - 'script/deliver-message'
46 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
51 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
52 # AllowedMethods: refine
57 # Configuration parameters: CountBlocks.
62 # Configuration parameters: CountComments, CountAsOne.
67 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
68 Metrics/CyclomaticComplexity:
72 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
77 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
78 Metrics/ParameterLists:
82 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
83 Metrics/PerceivedComplexity:
87 # This cop supports safe autocorrection (--autocorrect).
88 Minitest/EmptyLineBeforeAssertionMethods:
92 Minitest/MultipleAssertions:
96 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
97 # NamePrefix: is_, has_, have_
98 # ForbiddenPrefixes: is_, has_, have_
99 # AllowedMethods: is_a?
100 # MethodDefinitionMacros: define_method, define_singleton_method
101 Naming/PredicateName:
103 - 'app/models/user.rb'
106 # This cop supports unsafe autocorrection (--autocorrect-all).
107 Rails/ActionControllerFlashBeforeRender:
109 - 'app/controllers/traces_controller.rb'
112 # Configuration parameters: Database, Include.
113 # SupportedDatabases: mysql, postgresql
114 # Include: db/migrate/*.rb
115 Rails/BulkChangeTable:
117 - 'db/migrate/20111116184519_update_oauth.rb'
118 - 'db/migrate/20120208194454_add_domain_to_acl.rb'
119 - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
122 # Configuration parameters: Include.
123 # Include: app/models/**/*.rb
124 Rails/HasAndBelongsToMany:
126 - 'app/models/changeset.rb'
127 - 'app/models/user.rb'
130 # Configuration parameters: Include.
131 # Include: app/helpers/**/*.rb
132 Rails/HelperInstanceVariable:
134 - 'app/helpers/title_helper.rb'
137 # Configuration parameters: IgnoreScopes, Include.
138 # Include: app/models/**/*.rb
141 - 'app/models/changeset.rb'
142 - 'app/models/diary_entry.rb'
143 - 'app/models/friendship.rb'
144 - 'app/models/issue.rb'
145 - 'app/models/message.rb'
146 - 'app/models/note.rb'
147 - 'app/models/user.rb'
150 # Configuration parameters: Include.
151 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
152 Rails/LexicallyScopedActionFilter:
154 - 'app/controllers/oauth2_applications_controller.rb'
155 - 'app/controllers/oauth2_authorizations_controller.rb'
158 # Configuration parameters: Include.
159 # Include: db/migrate/*.rb
162 - 'db/migrate/002_cleanup_osm_db.rb'
163 - 'db/migrate/020_populate_node_tags_and_remove.rb'
164 - 'db/migrate/021_move_to_innodb.rb'
165 - 'db/migrate/025_add_end_time_to_changesets.rb'
166 - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
171 - 'app/helpers/application_helper.rb'
173 - 'test/helpers/application_helper_test.rb'
176 # This cop supports safe autocorrection (--autocorrect).
179 - 'lib/tasks/auto_annotate_models.rake'
180 - 'lib/tasks/eslint.rake'
181 - 'lib/tasks/subscribe_diary_authors.rake'
182 - 'lib/tasks/subscribe_old_changesets.rake'
185 # This cop supports unsafe autocorrection (--autocorrect-all).
186 # Configuration parameters: EnforcedStyle.
187 # SupportedStyles: always, always_true, never
188 Style/FrozenStringLiteralComment:
192 # This cop supports safe autocorrection (--autocorrect).
193 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
194 Style/NumericLiterals:
198 # This cop supports unsafe autocorrection (--autocorrect-all).
199 # Configuration parameters: .
200 # SupportedOperators: *, +, &, |, ^
201 Style/YodaExpression: