-
Notifications
You must be signed in to change notification settings - Fork 4
/
.rubocop.yml
386 lines (386 loc) · 15.8 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
require: rubocop-rspec
inherit_gem:
bixby: bixby_default.yml
AllCops:
DisplayCopNames: true
TargetRubyVersion: 3.1
Exclude:
- 'bin/*'
- 'config/deploy.rb'
- 'vendor/**/*'
- 'valkyrie/**/*'
- 'db/schema.rb'
- 'spec/support/**/*'
- 'node_modules/**/*'
- 'tmp/**/*'
- 'db/migrate/20220727213333_create_active_storage_variant_records.active_storage.rb'
- 'db/migrate/20220727213332_add_service_name_to_active_storage_blobs.active_storage.rb'
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
Naming/MethodName:
Exclude:
- 'app/values/pcdm_use.rb'
Metrics/AbcSize:
Exclude:
- 'app/services/ingest_ephemera_mods.rb'
- 'app/services/ingest_ephemera_service.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/models/concerns/linked_data/linked_ephemera_folder.rb'
- 'app/models/ability.rb'
- 'app/services/pdf_generator.rb'
- 'app/jobs/ingest_mets_job.rb'
- 'app/jobs/ingest_intermediate_file_job.rb'
- 'app/services/pul_metadata_services/bib_record.rb'
- 'app/services/music_import_service.rb'
- 'app/services/music_import_service/recording_collector.rb'
- 'app/helpers/application_helper.rb'
- 'app/services/preserver.rb'
- 'app/jobs/ingest_archival_media_bag_job.rb'
- 'app/utils/data_seeder.rb'
- 'app/exporters/hathi/submission_information_package.rb'
- 'app/jobs/browse_everything_ingest_job.rb'
- 'app/services/file_appender.rb'
- 'app/services/cdl/charge_manager.rb'
- 'app/jobs/cloud_fixity_job.rb'
Metrics/BlockLength:
Exclude:
- '**/*.rake'
- 'app/controllers/catalog_controller.rb'
- 'app/models/book_workflow.rb'
- 'app/models/geo_workflow.rb'
- 'config/environments/**/*'
- 'spec/**/*'
- 'config/initializers/*'
- 'config/routes.rb'
- 'lib/specs/**/*'
- 'db/schema.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/change_sets/change_set_workflow.rb'
- 'app/change_sets/simple_change_set.rb'
- 'app/controllers/concerns/resource_relations.rb'
- 'app/jobs/browse_everything_ingest_job.rb'
- 'app/derivative_services/geo_derivatives/processors/image.rb'
Metrics/ClassLength:
Exclude:
- 'app/change_sets/change_set.rb'
- 'app/change_set_persisters/change_set_persister.rb'
- 'app/derivative_services/raster_resource_derivative_service.rb'
- 'app/derivative_services/vector_resource_derivative_service.rb'
- 'app/derivative_services/jp2_derivative_service.rb'
- 'app/derivative_services/pdf_derivative_service.rb'
- 'app/derivative_services/vips_derivative_service.rb'
- 'app/derivative_services/thumbnail_derivative_service.rb'
- 'app/change_sets/ephemera_folder_change_set_base.rb'
- 'app/change_sets/numismatics/issue_change_set.rb'
- 'app/controllers/numismatics/issues_controller.rb'
- 'app/change_sets/scanned_resource_change_set.rb'
- 'app/models/ability.rb'
- 'app/decorators/ephemera_folder_decorator.rb'
- 'app/services/geo_discovery/geoblacklight_document.rb'
- 'app/services/geo_resource_reindexer.rb'
- 'app/services/ingest_ephemera_service.rb'
- 'app/services/ingest_ephemera_mods.rb'
- 'app/utils/data_seeder.rb'
- 'app/models/orangelight_coin_builder.rb'
- 'app/decorators/scanned_resource_decorator.rb'
- 'app/decorators/scanned_map_decorator.rb'
- 'app/models/concerns/linked_data/linked_ephemera_folder.rb'
- 'app/models/concerns/linked_data/linked_resource.rb'
- 'app/services/manifest_builder/manifest_service_locator.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/decorators/valkyrie/resource_decorator.rb'
- 'app/controllers/ephemera_folders_controller.rb'
- 'app/services/file_appender.rb'
- 'app/models/mets_document.rb'
- 'app/services/bulk_ingest_service.rb'
- 'app/models/mets_document/mods_document.rb'
- 'app/services/pul_metadata_services/bib_record.rb'
- 'app/resources/scanned_resources/simple_change_set.rb'
- 'app/jobs/ingest_archival_media_bag_job.rb'
- 'app/services/manifest_builder.rb'
- 'app/services/manifest_builder_v3/root_node.rb'
- 'app/controllers/catalog_controller.rb'
- 'app/services/music_import_service.rb'
- 'app/services/music_import_service/recording_collector.rb'
- 'app/services/numismatics_import_service.rb'
- 'app/controllers/bulk_ingest_controller.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/resources_controller.rb'
- 'app/decorators/numismatics/issue_decorator.rb'
- 'app/controllers/coins_controller.rb'
- 'app/services/preserver.rb'
- 'app/services/preserver/importer.rb'
- 'app/controllers/collections_controller.rb'
- 'app/services/marc_record_enhancer.rb'
- 'app/controllers/numismatics/coins_controller.rb'
- 'app/controllers/numismatics/issues_controller.rb'
- 'app/controllers/numismatics/coins_controller.rb'
- 'app/wayfinders/base_wayfinder.rb'
- 'app/services/cdl/charge_manager.rb'
- 'app/services/pulfa_exporter.rb'
- 'app/services/geo_metadata_extractor/iso19139.rb'
- 'app/services/dao_updater.rb'
- 'app/derivative_services/image_derivative_service.rb'
- 'app/models/file_set.rb'
- 'app/nested_resources/file_metadata.rb'
- 'app/services/embed.rb'
- 'app/services/manifest_builder/canvas_rendering_builder.rb'
- 'app/services/manifest_builder_v3/canvas_rendering_builder.rb'
- 'app/services/dpul_success_dashboard_report_generator.rb'
- 'app/controllers/reports_controller.rb'
Metrics/CyclomaticComplexity:
Max: 12
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/services/pdf_generator/canvas.rb'
- 'app/jobs/ingest_intermediate_file_job.rb'
- 'app/services/pul_metadata_services/bib_record.rb'
- 'app/services/bulk_ingest_service.rb'
- 'app/controllers/scanned_resources_controller.rb'
- 'app/change_set_persisters/change_set_persister/apply_auth_token.rb'
- 'config/initializers/sequel_active_support_notification.rb'
- 'app/services/music_import_service.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/services/manifest_builder.rb'
- 'app/jobs/browse_everything_ingest_job.rb'
- 'app/models/ability.rb'
Layout/LineLength:
Exclude:
- 'spec/views/scanned_resources/order_manager.html.erb_spec.rb'
- 'lib/tasks/music_reserves.rake'
- 'spec/features/playlist_spec.rb'
- 'spec/controllers/scanned_resources_controller_spec.rb'
- 'spec/views/catalog/_members_coin.html.erb_spec.rb'
- 'spec/helpers/application_helper_spec.rb'
- 'spec/controllers/collections_controller_spec.rb'
- 'spec/models/oai/figgy/valkyrie_provider_model_spec.rb'
- 'spec/decorators/numismatics/accession_decorator_spec.rb'
- 'config/initializers/simple_form_bootstrap.rb'
Metrics/MethodLength:
Max: 15
Exclude:
- 'db/migrate/**/*'
- 'app/models/schema/common.rb'
- 'app/models/schema/marc_relators.rb'
- 'spec/services/manifest_builder/by_resource_type/manifest_builder_scanned_resource_spec.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/change_sets/ephemera_folder_change_set_base.rb'
- 'app/models/concerns/linked_data/linked_ephemera_folder.rb'
- 'app/utils/data_seeder.rb'
- 'app/services/bulk_ingest_service.rb'
- 'app/controllers/file_sets_controller.rb'
- 'app/services/folder_json_importer.rb'
- 'app/models/ability.rb'
- 'app/models/controlled_vocabulary.rb'
- 'app/change_sets/simple_change_set.rb'
- 'app/change_sets/numismatics/issue_change_set.rb'
- 'app/change_sets/numismatics/coin_change_set.rb'
- 'app/controllers/resources_controller.rb'
- 'app/services/pdf_generator.rb'
- 'app/services/file_appender.rb'
- 'app/jobs/voyager_update_job.rb'
- 'app/models/mets_document.rb'
- 'app/jobs/ingest_intermediate_file_job.rb'
- 'app/services/bulk_ingest_intermediate_service.rb'
- 'app/models/remote_record.rb'
- 'app/services/pul_metadata_services/bib_record.rb'
- 'app/models/concerns/linked_data/linked_resource.rb'
- 'app/services/manifest_builder/canvas_rendering_builder.rb'
- 'app/services/manifest_builder_v3/canvas_rendering_builder.rb'
- 'app/services/music_import_service.rb'
- 'app/services/music_import_service/recording_collector.rb'
- 'config/initializers/sequel_active_support_notification.rb'
- 'app/services/manifest_builder.rb'
- 'app/services/manifest_builder_v3/root_node.rb'
- 'app/indexers/imported_metadata_indexer.rb'
- 'app/controllers/reports_controller.rb'
- 'app/models/search_builder.rb'
- 'app/helpers/application_helper.rb'
- 'app/change_sets/change_set.rb'
- 'app/change_sets/scanned_resource_change_set.rb'
- 'app/values/viewer_configuration.rb'
- 'app/preserver/preserve_resource.rb'
- 'app/services/preserver.rb'
- 'app/services/numismatics_import_service.rb'
- 'app/jobs/ingest_archival_media_bag_job.rb'
- 'app/services/preserver/importer.rb'
- 'app/jobs/bulk_update_job.rb'
- 'app/jobs/browse_everything_ingest_job.rb'
- 'app/controllers/application_controller.rb'
- 'app/services/ingest_ephemera_mods.rb'
- 'app/helpers/thumbnail_helper.rb'
- 'app/exporters/hathi/submission_information_package.rb'
- 'app/controllers/numismatics/issues_controller.rb'
- 'app/services/manifest_builder_v3/nav_place_builder.rb'
- 'spec/support/stub_aspace.rb'
- 'spec/services/manifest_builder_v3/by_resource_type/manifest_builder_v3_scanned_map_spec.rb'
- 'app/services/cdl/charge_manager.rb'
- 'app/services/preserver/blind_importer.rb'
- 'app/change_set_persisters/change_set_persister.rb'
- 'app/services/embed.rb'
Metrics/ModuleLength:
Exclude:
- 'app/models/schema/marc_relators.rb'
- 'app/helpers/application_helper.rb'
Metrics/ParameterLists:
Exclude:
- 'app/change_set_persisters/change_set_persister.rb'
- 'app/jobs/ingest_folders_job.rb'
- 'app/jobs/ingest_folder_job.rb'
- 'app/services/music_import_service/recording_collector.rb'
- 'app/services/music_import_service.rb'
- 'app/services/numismatics_import_service.rb'
- 'app/jobs/issue_import_job.rb'
- 'app/queries/paged_all_query.rb'
- 'spec/models/oai/figgy/valkyrie_provider_model_spec.rb'
Metrics/PerceivedComplexity:
Max: 12
Exclude:
- 'app/services/pdf_generator/canvas.rb'
- 'app/jobs/ingest_intermediate_file_job.rb'
- 'app/services/pul_metadata_services/bib_record.rb'
- 'app/services/bulk_ingest_service.rb'
- 'app/controllers/scanned_resources_controller.rb'
- 'app/change_set_persisters/change_set_persister/update_auth_token.rb'
- 'app/change_set_persisters/change_set_persister/apply_auth_token.rb'
- 'config/initializers/sequel_active_support_notification.rb'
- 'app/services/music_import_service.rb'
- 'app/helpers/application_helper.rb'
- 'app/services/pdf_generator/cover_page_generator.rb'
- 'app/jobs/browse_everything_ingest_job.rb'
- 'app/models/ability.rb'
Rails/OutputSafety:
Exclude:
- 'app/helpers/fixity_dashboard_helper.rb'
- 'app/decorators/**/*_decorator*'
- 'app/validators/unique_archival_media_component_id_validator.rb'
- 'app/controllers/omniauth_callbacks_controller.rb'
RSpec/AnyInstance:
Exclude:
- 'spec/jobs/ingest_mets_job_spec.rb'
- 'spec/services/geoblacklight_messaging_client_spec.rb'
- 'spec/services/geoserver_messaging_client_spec.rb'
- 'spec/services/messaging_client_spec.rb'
- 'spec/services/orangelight_messaging_client_spec.rb'
- 'spec/jobs/check_fixity_recursive_job_spec.rb'
- 'spec/controllers/fixity_dashboard_controller_spec.rb'
- 'spec/change_sets/archival_media_collection_change_set_spec.rb'
- 'spec/services/voyager_updater/event_spec.rb'
- 'spec/jobs/voyager_update_job_spec.rb'
- 'spec/services/cloud_fixity_spec.rb'
- 'spec/views/catalog/_members_multi_volume_work.html.erb_spec.rb'
- 'spec/views/catalog/_resource_attributes_default.html.erb_spec.rb'
- 'spec/jobs/cdl/pdf_ingest_job_spec.rb'
- 'spec/services/cdl/automatic_completer_spec.rb'
- 'spec/jobs/ingest_intermediate_file_job_spec.rb'
- 'spec/services/preserver_spec.rb'
RSpec/DescribeClass:
Exclude:
- 'spec/abilities/**/*'
- 'spec/features/**/*'
- 'spec/views/**/*'
- 'spec/routing/**/*'
- 'spec/inputs/**/*'
- 'spec/requests/**/*'
- 'spec/resources/**/*routes_spec.rb'
- 'spec/adapters/bagit/bag_roundtrip_spec.rb'
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/models/search_builder_spec.rb'
RSpec/ExampleLength:
Enabled: false
RSpec/FilePath:
Exclude:
- 'spec/registered_adapter_spec.rb'
RSpec/MessageChain:
Exclude:
- 'spec/decorators/file_set_decorator_spec.rb'
RSpec/MultipleExpectations:
Enabled: false
RSpec/NestedGroups:
Exclude:
- 'spec/controllers/scanned_resources_controller_spec.rb'
- 'spec/controllers/catalog_controller_spec.rb'
- 'spec/controllers/simple_resources_controller_spec.rb'
- 'spec/jobs/ingest_folders_job_spec.rb'
- 'spec/controllers/playlists_controller_spec.rb'
- 'spec/change_set_persisters/change_set_persister_spec.rb'
- 'spec/requests/scanned_resource_spec.rb'
- 'spec/controllers/bulk_ingest_controller_spec.rb'
- 'spec/controllers/monograms_controller_spec.rb'
- 'spec/helpers/application_helper_spec.rb'
- 'spec/requests/viewer_config_spec.rb'
- 'spec/controllers/collections_controller_spec.rb'
- 'spec/controllers/playlists_controller_spec.rb'
RSpec/VerifiedDoubles:
Exclude:
- 'spec/models/search_builder_spec.rb'
- 'spec/validators/viewing_hint_validator_spec.rb'
- 'spec/validators/viewing_direction_validator_spec.rb'
- 'spec/validators/year_validator_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/derivative_services/image_derivative_service_spec.rb'
- 'spec/derivative_services/jp2_derivative_service_spec.rb'
- 'spec/derivative_services/vips_derivative_service_spec.rb'
- 'spec/jobs/ingest_intermediate_file_job_spec.rb'
Naming/FileName:
Enabled: true
Exclude:
- 'Gemfile'
- '**/*.rake'
- 'Capfile'
Style/LineEndConcatenation:
Exclude:
- 'app/controllers/reports_controller_spec.rb'
Lint/MissingSuper:
Exclude:
- 'app/decorators/media_info_tracks_decorator.rb'
- 'app/adapters/bagit/metadata_adapter.rb'
- 'app/components/breadcrumb_component.rb'
- 'app/models/oai/figgy/marc21.rb'
- 'app/services/aspace/client.rb'
- 'config/initializers/monkeypatches/*'
Style/MissingRespondToMissing:
Exclude:
- 'app/decorators/media_info_tracks_decorator.rb'
Naming/PredicateName:
Exclude:
- 'app/controllers/catalog_controller.rb'
- 'app/models/ingestable_audio_file.rb'
Style/StringLiterals:
EnforcedStyle: double_quotes
Security/MarshalLoad:
Exclude:
- 'app/services/music_import_service/recording_collector/marshal_cache.rb'
RSpec/ScatteredSetup:
Exclude:
- 'spec/resources/vector_resources/vector_resource_derivative_service_spec.rb'
- 'spec/derivative_services/external_metadata_derivative_service_spec.rb'
Style/PreferredHashMethods:
Exclude:
- 'app/queries/find_ids_with_property_not_empty.rb'
- 'app/queries/paged_all_query.rb'
Lint/Void:
Exclude:
# It's important that an explicit false be returned here to match the
# expected signature, but Rubocop complains.
- 'app/change_sets/template_change_set.rb'
# Triggered by a weird ImageMagick API that's necessary.
- 'app/derivative_services/jp2_derivative_service.rb'
# We don't like postfix conditionals.
Style/IfUnlessModifier:
Enabled: false
Lint/SuppressedException:
Exclude:
- 'lib/tasks/performance.rake'
Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods
Rails/UnknownEnv:
Enabled: false
Rails/CreateTableWithTimestamps:
Enabled: false
Style/HashSyntax:
EnforcedShorthandSyntax: never
Style/FrozenStringLiteralComment:
Exclude:
- '.irbrc'