forked from rubytoolbox/rubytoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
96 lines (76 loc) · 2.13 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
#
# Our adjustments to rubocop default code policies.
#
# See http://rubocop.readthedocs.io/en/latest/ for detailed configuration options documentation
require:
- rubocop-performance
- rubocop-rails
# Additional cops for working with RSpec. See https://github.com/backus/rubocop-rspec
- rubocop-rspec
AllCops:
Exclude:
- 'tmp/**/*.rb'
# Apparently needed for Travis CI since it bundles into this directory
- 'vendor/bundle/**/*'
Rails:
Enabled: true
# Reads best in my humble opinion
Layout/AlignHash:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Metrics/BlockLength:
Exclude:
# The default guard-rspec config fails this, but it's ok.
- 'Guardfile'
- 'spec/**/*_examples.rb'
- 'spec/**/*_spec.rb'
- 'spec/rails_helper.rb'
# Big screens are common :)
Metrics/LineLength:
Max: 120
Metrics/MethodLength:
Exclude:
- 'db/migrate/**/*'
# We use RSpec as a format linter, so no specific classes under test neccessarily :)
RSpec/DescribeClass:
Enabled: false
# When setting up message expectations, 5 is frequently too little
RSpec/ExampleLength:
Max: 10
Exclude:
# Not efficient for acceptance tests
- 'spec/features/**/*'
RSpec/FilePath:
Exclude:
- 'spec/integration/*'
# Prefer to use the up-front message expectations
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleExpectations:
Exclude:
# Not efficient for acceptance tests
- 'spec/features/**/*'
# Prefer structure over small indentation
RSpec/NestedGroups:
Max: 5
# See https://github.com/rubocop-hq/rubocop/issues/5953#issuecomment-399973424
# Making attr_accessor & friends private inline is more concise
Style/AccessModifierDeclarations:
Enabled: false
Style/ClassAndModuleChildren:
# Against rails conventions
Enabled: false
Style/Documentation:
Enabled: false
# Prefer to create "real" booleans using double negation
Style/DoubleNegation:
Enabled: false
Style/MixinUsage:
Exclude:
- 'bin/*'
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma