]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Localisation updates from https://translatewiki.net.
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2024-08-27 18:01:13 UTC using RuboCop version 1.65.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: 13
18 # Configuration parameters: Include, MaxAmount.
19 # Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
20 FactoryBot/ExcessiveCreateList:
21   Exclude:
22     - 'test/controllers/api/changeset_comments_controller_test.rb'
23     - 'test/controllers/api/messages/inboxes_controller_test.rb'
24     - 'test/controllers/api/messages/outboxes_controller_test.rb'
25     - 'test/controllers/changesets_controller_test.rb'
26     - 'test/controllers/diary_entries_controller_test.rb'
27     - 'test/controllers/notes_controller_test.rb'
28     - 'test/controllers/traces_controller_test.rb'
29     - 'test/controllers/user_blocks_controller_test.rb'
30     - 'test/controllers/users/issued_blocks_controller_test.rb'
31     - 'test/controllers/users/received_blocks_controller_test.rb'
32     - 'test/system/users_test.rb'
33
34 # Offense count: 635
35 # This cop supports safe autocorrection (--autocorrect).
36 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
37 # URISchemes: http, https
38 Layout/LineLength:
39   Max: 234
40
41 # Offense count: 23
42 # This cop supports unsafe autocorrection (--autocorrect-all).
43 # Configuration parameters: AllowSafeAssignment.
44 Lint/AssignmentInCondition:
45   Exclude:
46     - 'app/controllers/accounts_controller.rb'
47     - 'app/controllers/api/traces_controller.rb'
48     - 'app/controllers/api/user_preferences_controller.rb'
49     - 'app/controllers/geocoder_controller.rb'
50     - 'app/controllers/traces_controller.rb'
51     - 'app/controllers/users_controller.rb'
52     - 'app/helpers/application_helper.rb'
53     - 'app/helpers/browse_tags_helper.rb'
54     - 'app/mailers/user_mailer.rb'
55     - 'lib/nominatim.rb'
56     - 'lib/osm.rb'
57     - 'script/deliver-message'
58
59 # Offense count: 762
60 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
61 Metrics/AbcSize:
62   Max: 189
63
64 # Offense count: 37
65 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
66 # AllowedMethods: refine
67 Metrics/BlockLength:
68   Max: 71
69
70 # Offense count: 8
71 # Configuration parameters: CountBlocks, CountModifierForms.
72 Metrics/BlockNesting:
73   Max: 5
74
75 # Offense count: 26
76 # Configuration parameters: CountComments, CountAsOne.
77 Metrics/ClassLength:
78   Max: 309
79
80 # Offense count: 58
81 # Configuration parameters: AllowedMethods, AllowedPatterns.
82 Metrics/CyclomaticComplexity:
83   Max: 25
84
85 # Offense count: 844
86 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
87 Metrics/MethodLength:
88   Max: 179
89
90 # Offense count: 1
91 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
92 Metrics/ParameterLists:
93   Max: 6
94
95 # Offense count: 58
96 # Configuration parameters: AllowedMethods, AllowedPatterns.
97 Metrics/PerceivedComplexity:
98   Max: 26
99
100 # Offense count: 2784
101 # This cop supports safe autocorrection (--autocorrect).
102 Minitest/EmptyLineBeforeAssertionMethods:
103   Enabled: false
104
105 # Offense count: 695
106 Minitest/MultipleAssertions:
107   Max: 60
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: 17
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/issue.rb'
132     - 'app/models/message.rb'
133     - 'app/models/note.rb'
134     - 'app/models/user.rb'
135
136 # Offense count: 1
137 # Configuration parameters: Include.
138 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
139 Rails/LexicallyScopedActionFilter:
140   Exclude:
141     - 'app/controllers/oauth2_applications_controller.rb'
142
143 # Offense count: 5
144 # Configuration parameters: Database, Include.
145 # SupportedDatabases: mysql
146 # Include: db/**/*.rb
147 Rails/NotNullColumn:
148   Exclude:
149     - 'db/migrate/002_cleanup_osm_db.rb'
150     - 'db/migrate/020_populate_node_tags_and_remove.rb'
151     - 'db/migrate/021_move_to_innodb.rb'
152     - 'db/migrate/025_add_end_time_to_changesets.rb'
153     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
154
155 # Offense count: 7
156 Rails/OutputSafety:
157   Exclude:
158     - 'app/helpers/application_helper.rb'
159     - 'app/helpers/user_mailer_helper.rb'
160     - 'lib/rich_text.rb'
161     - 'test/helpers/application_helper_test.rb'
162
163 # Offense count: 16
164 # Configuration parameters: Include.
165 # Include: db/**/*.rb
166 Rails/ThreeStateBooleanColumn:
167   Exclude:
168     - 'db/migrate/001_create_osm_db.rb'
169     - 'db/migrate/006_tile_nodes.rb'
170     - 'db/migrate/007_add_relations.rb'
171     - 'db/migrate/054_refactor_map_bug_tables.rb'
172     - 'db/migrate/20140507110937_create_changeset_comments.rb'
173
174 # Offense count: 6
175 # This cop supports safe autocorrection (--autocorrect).
176 Rake/Desc:
177   Exclude:
178     - 'lib/tasks/auto_annotate_models.rake'
179     - 'lib/tasks/eslint.rake'
180     - 'lib/tasks/subscribe_diary_authors.rake'
181     - 'lib/tasks/subscribe_old_changesets.rake'
182
183 # Offense count: 712
184 # This cop supports unsafe autocorrection (--autocorrect-all).
185 # Configuration parameters: EnforcedStyle.
186 # SupportedStyles: always, always_true, never
187 Style/FrozenStringLiteralComment:
188   Enabled: false
189
190 # Offense count: 78
191 # This cop supports safe autocorrection (--autocorrect).
192 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
193 Style/NumericLiterals:
194   MinDigits: 15