-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
63 lines (51 loc) · 1.72 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
require:
- rubocop-rails
- rubocop-rspec
AllCops:
Exclude:
- bin/**/*
- config/**/*
- db/schema.rb
- db/migrate/*.rb
- node_modules/**/*
- tmp/**/*
- vendor/**/*
#################### Bundler ###########################
Bundler/OrderedGems:
Description: >-
Gems within groups in the Gemfile should be alphabetically sorted.
Enabled: true
ConsiderPunctuation: true
#################### Layout ###########################
Layout/LineLength:
Description: 'Checks that line length does not exceed the configured limit.'
AutoCorrect: true # this is false by default
Exclude:
- Gemfile
#################### Style ###############################
Style/StringLiterals:
Description: 'Checks if uses of quotes match the configured preference.'
StyleGuide: '#consistent-string-literals'
Enabled: true
EnforcedStyle: double_quotes
ConsistentQuotesInMultiline: true
#################### RSpec cops from rubocop-rspec #######
# https://github.com/rubocop-hq/rubocop-rspec/blob/master/config/default.yml
RSpec/DescribeClass:
Description: Check that the first argument to the top level describe is a constant.
Enabled: true
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
Exclude:
- 'spec/requests/**/*'
- 'spec/system/**/*'
- 'spec/tasks/**/*'
RSpec/ExampleLength:
Description: Checks for long examples.
Enabled: true
Max: 15
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
RSpec/MultipleExpectations:
Description: Checks if examples contain too many `expect` calls.
Enabled: true
Max: 8
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations