]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
reintroduce unsafe-eval CSP rule for iD
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2023-04-11 16:47:05 UTC using RuboCop version 1.50.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.
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: 11
18 # Configuration parameters: Include, MaxAmount
19 FactoryBot/ExcessiveCreateList:
20   MaxAmount: 200
21
22 # Offense count: 557
23 # This cop supports safe autocorrection (--autocorrect).
24 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
25 # URISchemes: http, https
26 Layout/LineLength:
27   Max: 248
28
29 # Offense count: 29
30 # This cop supports unsafe autocorrection (--autocorrect-all).
31 # Configuration parameters: AllowSafeAssignment.
32 Lint/AssignmentInCondition:
33   Exclude:
34     - 'app/controllers/accounts_controller.rb'
35     - 'app/controllers/api/traces_controller.rb'
36     - 'app/controllers/api/user_preferences_controller.rb'
37     - 'app/controllers/application_controller.rb'
38     - 'app/controllers/geocoder_controller.rb'
39     - 'app/controllers/notes_controller.rb'
40     - 'app/controllers/traces_controller.rb'
41     - 'app/controllers/users_controller.rb'
42     - 'app/helpers/application_helper.rb'
43     - 'app/helpers/browse_tags_helper.rb'
44     - 'app/mailers/user_mailer.rb'
45     - 'app/models/client_application.rb'
46     - 'lib/nominatim.rb'
47     - 'lib/osm.rb'
48     - 'script/deliver-message'
49
50 # Offense count: 680
51 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
52 Metrics/AbcSize:
53   Max: 189
54
55 # Offense count: 73
56 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
57 # AllowedMethods: refine
58 Metrics/BlockLength:
59   Max: 71
60
61 # Offense count: 20
62 # Configuration parameters: CountBlocks.
63 Metrics/BlockNesting:
64   Max: 5
65
66 # Offense count: 26
67 # Configuration parameters: CountComments, CountAsOne.
68 Metrics/ClassLength:
69   Max: 314
70
71 # Offense count: 59
72 # Configuration parameters: AllowedMethods, AllowedPatterns.
73 Metrics/CyclomaticComplexity:
74   Max: 29
75
76 # Offense count: 753
77 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
78 Metrics/MethodLength:
79   Max: 179
80
81 # Offense count: 1
82 # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
83 Metrics/ParameterLists:
84   Max: 6
85
86 # Offense count: 56
87 # Configuration parameters: AllowedMethods, AllowedPatterns.
88 Metrics/PerceivedComplexity:
89   Max: 30
90
91 # Offense count: 2394
92 # This cop supports safe autocorrection (--autocorrect).
93 Minitest/EmptyLineBeforeAssertionMethods:
94   Enabled: false
95
96 # Offense count: 565
97 Minitest/MultipleAssertions:
98   Max: 54
99
100 # Offense count: 1
101 # This cop supports unsafe autocorrection (--autocorrect-all).
102 Rails/ActionControllerFlashBeforeRender:
103   Exclude:
104     - 'app/controllers/traces_controller.rb'
105
106 # Offense count: 5
107 # Configuration parameters: Database, Include.
108 # SupportedDatabases: mysql, postgresql
109 # Include: db/migrate/*.rb
110 Rails/BulkChangeTable:
111   Exclude:
112     - 'db/migrate/20111116184519_update_oauth.rb'
113     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
114     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
115
116 # Offense count: 2
117 # Configuration parameters: Include.
118 # Include: app/models/**/*.rb
119 Rails/HasAndBelongsToMany:
120   Exclude:
121     - 'app/models/changeset.rb'
122     - 'app/models/user.rb'
123
124 # Offense count: 3
125 # Configuration parameters: Include.
126 # Include: app/helpers/**/*.rb
127 Rails/HelperInstanceVariable:
128   Exclude:
129     - 'app/helpers/title_helper.rb'
130
131 # Offense count: 16
132 # Configuration parameters: IgnoreScopes, Include.
133 # Include: app/models/**/*.rb
134 Rails/InverseOf:
135   Exclude:
136     - 'app/models/changeset.rb'
137     - 'app/models/diary_entry.rb'
138     - 'app/models/friendship.rb'
139     - 'app/models/issue.rb'
140     - 'app/models/message.rb'
141     - 'app/models/note.rb'
142     - 'app/models/user.rb'
143
144 # Offense count: 2
145 # Configuration parameters: Include.
146 # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
147 Rails/LexicallyScopedActionFilter:
148   Exclude:
149     - 'app/controllers/oauth2_applications_controller.rb'
150     - 'app/controllers/oauth2_authorizations_controller.rb'
151
152 # Offense count: 5
153 # Configuration parameters: Include.
154 # Include: db/migrate/*.rb
155 Rails/NotNullColumn:
156   Exclude:
157     - 'db/migrate/002_cleanup_osm_db.rb'
158     - 'db/migrate/020_populate_node_tags_and_remove.rb'
159     - 'db/migrate/021_move_to_innodb.rb'
160     - 'db/migrate/025_add_end_time_to_changesets.rb'
161     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
162
163 # Offense count: 7
164 Rails/OutputSafety:
165   Exclude:
166     - 'app/helpers/application_helper.rb'
167     - 'lib/rich_text.rb'
168     - 'test/helpers/application_helper_test.rb'
169
170 # Offense count: 16
171 # Configuration parameters: Include.
172 # Include: db/**/*.rb
173 Rails/ThreeStateBooleanColumn:
174   Exclude:
175     - 'db/migrate/001_create_osm_db.rb'
176     - 'db/migrate/006_tile_nodes.rb'
177     - 'db/migrate/007_add_relations.rb'
178     - 'db/migrate/054_refactor_map_bug_tables.rb'
179     - 'db/migrate/20140507110937_create_changeset_comments.rb'
180
181 # Offense count: 6
182 # This cop supports safe autocorrection (--autocorrect).
183 Rake/Desc:
184   Exclude:
185     - 'lib/tasks/auto_annotate_models.rake'
186     - 'lib/tasks/eslint.rake'
187     - 'lib/tasks/subscribe_diary_authors.rake'
188     - 'lib/tasks/subscribe_old_changesets.rake'
189
190 # Offense count: 632
191 # This cop supports unsafe autocorrection (--autocorrect-all).
192 # Configuration parameters: EnforcedStyle.
193 # SupportedStyles: always, always_true, never
194 Style/FrozenStringLiteralComment:
195   Enabled: false
196
197 # Offense count: 72
198 # This cop supports safe autocorrection (--autocorrect).
199 # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
200 Style/NumericLiterals:
201   MinDigits: 15