This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
/
.rubocop.yml
113 lines (92 loc) · 2.67 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
# List of cops can be found here:
# https://github.com/bbatsov/rubocop/blob/master/config/default.yml
# https://github.com/bbatsov/rubocop/blob/master/config/disabled.yml
# https://github.com/bbatsov/rubocop/blob/master/config/enabled.yml
require: rubocop-rspec
inherit_from: .rubocop_todo.yml
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
Exclude:
- 'vendor/**/*'
- 'db/**/*'
- 'tmp/**/*'
- 'app/actors/hyrax/actors/create_with_remote_files_actor.rb'
ExtraDetails: true
TargetRubyVersion: 2.4
Metrics/BlockLength:
Exclude:
- 'app/controllers/catalog_controller.rb'
- 'config/routes.rb'
- 'config/initializers/hyrax.rb'
- 'config/initializers/simple_form_bootstrap.rb'
- 'spec/**/*.rb'
- 'lib/tasks/s3_tasks.rake'
- 'lib/tasks/donut.rake'
- 'app/services/donut/migration_service.rb'
Metrics/ClassLength:
Exclude:
- 'app/controllers/catalog_controller.rb'
- 'app/batch/importer/factory/object_factory.rb'
- 'app/models/solr_document.rb'
- 'app/models/image.rb'
- 'app/forms/hyrax/image_form.rb'
- 'app/services/common_indexers/base.rb'
- 'app/services/donut/migration_service.rb'
Metrics/LineLength:
Max: 164 # default is 80
Exclude:
- 'spec/forms/hyrax/image_form_spec.rb'
- 'spec/factories/images.rb'
- 'spec/support/stub_exif.rb'
- 'spec/services/donut/migration_service_spec.rb'
- 'app/services/donut/migration_service.rb'
Metrics/MethodLength:
Max: 14 # default is 10
Exclude:
- 'app/services/common_indexers/image.rb'
- 'app/services/donut/migration_service.rb'
Layout/IndentationConsistency:
EnforcedStyle: rails
Style/CollectionMethods:
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'
Style/FileName: # https://github.com/bbatsov/rubocop/issues/2973
Exclude:
- 'Gemfile'
Style/Documentation:
Enabled: false
Style/SingleLineBlockParams:
Enabled: false
Rails:
Enabled: true
ClassAndModuleChildren:
Enabled: false
# Checks if there is a magic comment to enforce string literals
Style/FrozenStringLiteralComment:
Enabled: false
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
# Use %w or %W for arrays of words.
Style/WordArray:
Enabled: false
Style/SymbolArray:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/DescribeClass:
Exclude:
- 'spec/views/**/*'
RSpec/ExampleLength:
Exclude:
- 'spec/app/batch/importer/factory/image_factory_spec.rb'
- 'spec/forms/hyrax/image_form_spec.rb'
- 'spec/services/common_indexers/file_set_spec.rb'
Metrics/CyclomaticComplexity:
Exclude:
- 'app/helpers/application_helper.rb'