1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2022-11-01 18:20:38 UTC using RuboCop version 1.38.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 # Configuration parameters: AllowSafeAssignment.
26 Lint/AssignmentInCondition:
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'
42 - 'script/deliver-message'
45 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
50 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
51 # AllowedMethods: refine
56 # Configuration parameters: CountBlocks.
61 # Configuration parameters: CountComments, CountAsOne.
66 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
67 Metrics/CyclomaticComplexity:
71 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
76 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
77 Metrics/ParameterLists:
81 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
82 Metrics/PerceivedComplexity:
86 # This cop supports safe autocorrection (--autocorrect).
87 Minitest/EmptyLineBeforeAssertionMethods:
91 Minitest/MultipleAssertions:
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:
102 - 'app/models/user.rb'
105 # This cop supports unsafe autocorrection (--autocorrect-all).
106 Rails/ActionControllerFlashBeforeRender:
108 - 'app/controllers/confirmations_controller.rb'
109 - 'app/controllers/friendships_controller.rb'
110 - 'app/controllers/oauth_controller.rb'
111 - 'app/controllers/traces_controller.rb'
112 - 'app/controllers/user_blocks_controller.rb'
113 - 'app/controllers/users_controller.rb'
116 # This cop supports safe autocorrection (--autocorrect).
117 # Configuration parameters: ExpectedOrder, Include.
118 # ExpectedOrder: index, show, new, edit, create, update, destroy
119 # Include: app/controllers/**/*.rb
122 - 'app/controllers/api/changesets_controller.rb'
123 - 'app/controllers/api/nodes_controller.rb'
124 - 'app/controllers/api/notes_controller.rb'
125 - 'app/controllers/api/relations_controller.rb'
126 - 'app/controllers/api/traces_controller.rb'
127 - 'app/controllers/api/users_controller.rb'
128 - 'app/controllers/api/ways_controller.rb'
129 - 'app/controllers/diary_entries_controller.rb'
130 - 'app/controllers/messages_controller.rb'
131 - 'app/controllers/oauth_clients_controller.rb'
132 - 'app/controllers/redactions_controller.rb'
133 - 'app/controllers/traces_controller.rb'
134 - 'app/controllers/users_controller.rb'
137 # Configuration parameters: Database, Include.
138 # SupportedDatabases: mysql, postgresql
139 # Include: db/migrate/*.rb
140 Rails/BulkChangeTable:
142 - 'db/migrate/20111116184519_update_oauth.rb'
143 - 'db/migrate/20120208194454_add_domain_to_acl.rb'
144 - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
147 # Configuration parameters: Include.
148 # Include: app/models/**/*.rb
149 Rails/HasAndBelongsToMany:
151 - 'app/models/changeset.rb'
152 - 'app/models/user.rb'
155 # Configuration parameters: Include.
156 # Include: app/helpers/**/*.rb
157 Rails/HelperInstanceVariable:
159 - 'app/helpers/title_helper.rb'
162 # Configuration parameters: IgnoreScopes, Include.
163 # Include: app/models/**/*.rb
166 - 'app/models/changeset.rb'
167 - 'app/models/diary_entry.rb'
168 - 'app/models/friendship.rb'
169 - 'app/models/issue.rb'
170 - 'app/models/message.rb'
171 - 'app/models/note.rb'
172 - 'app/models/user.rb'
175 # Configuration parameters: Include.
176 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
177 Rails/LexicallyScopedActionFilter:
179 - 'app/controllers/oauth2_applications_controller.rb'
180 - 'app/controllers/oauth2_authorizations_controller.rb'
183 # Configuration parameters: Include.
184 # Include: db/migrate/*.rb
187 - 'db/migrate/002_cleanup_osm_db.rb'
188 - 'db/migrate/020_populate_node_tags_and_remove.rb'
189 - 'db/migrate/021_move_to_innodb.rb'
190 - 'db/migrate/025_add_end_time_to_changesets.rb'
191 - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
196 - 'app/controllers/sessions_controller.rb'
197 - 'app/controllers/users_controller.rb'
198 - 'app/helpers/application_helper.rb'
200 - 'test/helpers/application_helper_test.rb'
203 # This cop supports safe autocorrection (--autocorrect).
206 - 'lib/tasks/auto_annotate_models.rake'
207 - 'lib/tasks/eslint.rake'
208 - 'lib/tasks/subscribe_diary_authors.rake'
209 - 'lib/tasks/subscribe_old_changesets.rake'
212 # This cop supports unsafe autocorrection (--autocorrect-all).
213 # Configuration parameters: EnforcedStyle.
214 # SupportedStyles: always, always_true, never
215 Style/FrozenStringLiteralComment:
219 # This cop supports safe autocorrection (--autocorrect).
220 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
221 Style/NumericLiterals: