-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.rubocop.yml
64 lines (52 loc) · 1.51 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
# Rubocop configuration, see https://docs.rubocop.org/rubocop/configuration.html
# https://github.com/rubocop-hq/rubocop-rails
# https://github.com/rubocop-hq/rubocop-rspec
require:
- rubocop-rails
- rubocop-rspec
#
# Opt-in to new rules by default
#
# For more information: https://docs.rubocop.org/rubocop/versioning.html
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
#
# Specific excludes & includes
#
# Okay to have long examples in feature tests, there are usually many steps
RSpec/ExampleLength:
Exclude:
- 'spec/features/*.rb'
# Okay to have more than one expectation in a single block, default: 1
RSpec/MultipleExpectations:
Max: 2
Exclude:
- 'spec/features/*.rb'
# Ignore LineLength for config files (e.g. with long secret strings)
Layout/LineLength:
Exclude:
- 'config/**/*.rb'
# Ignore "Block has too many lines" for specs, `RSpec.describe` blocks can be long
# We have more routes than fit in one block
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- 'config/routes.rb'
# Only check "Missing top-level class documentation comment" for models
Style/Documentation:
Include:
- 'app/models/*.rb'
# Ignore empty lines in schema.rb. File is generated.
Layout/EmptyLinesAroundBlockBody:
Exclude:
- 'db/schema.rb'
#
# Ignoring entire rules
#
# Ignore "Missing frozen string literal comment"
Style/FrozenStringLiteralComment:
Enabled: false
# Ignore "Gems should be sorted in an alphabetical order within their section of the Gemfile"
Bundler/OrderedGems:
Enabled: false