-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.rubocop.yml
More file actions
114 lines (92 loc) · 2 KB
/
.rubocop.yml
File metadata and controls
114 lines (92 loc) · 2 KB
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
# StreamSource RuboCop Configuration
plugins:
- rubocop-rails
- rubocop-performance
- rubocop-rspec
AllCops:
TargetRubyVersion: 4.0
TargetRailsVersion: 8.1
NewCops: enable
SuggestExtensions: false
Exclude:
- 'bin/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'db/schema.rb'
- 'db/migrate/**/*'
- 'coverage/**/*'
- 'log/**/*'
- 'public/**/*'
- 'storage/**/*'
- 'Gemfile.lock'
- 'config/boot.rb'
- 'config/application.rb'
- 'config/environments/production.rb'
Rails:
Enabled: true
# Keep Rails conventions; allow slightly more flexibility in specs.
Layout/LineLength:
Max: 120
AllowedPatterns:
- '\\A\\s*#.*\\z'
- '\\A\\s*it\\s.*\\z'
- '\\A\\s*describe\\s.*\\z'
- '\\A\\s*context\\s.*\\z'
Style/StringLiterals:
EnforcedStyle: double_quotes
ConsistentQuotesInMultiline: true
Style/ClassAndModuleChildren:
EnforcedStyle: nested
Style/FrozenStringLiteralComment:
EnforcedStyle: never
Style/SingleLineMethods:
AllowIfMethodIsEmpty: true
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Metrics/MethodLength:
Max: 20
CountAsOne: ['array', 'heredoc']
Exclude:
- 'spec/**/*'
- 'config/routes.rb'
Metrics/ClassLength:
Max: 150
CountAsOne: ['array', 'heredoc']
Exclude:
- 'spec/**/*'
Metrics/BlockLength:
Max: 25
CountAsOne: ['array', 'heredoc']
Exclude:
- 'spec/**/*'
- 'config/routes.rb'
- 'config/environments/**/*'
- 'Guardfile'
- 'Rakefile'
Metrics/AbcSize:
Max: 25
Exclude:
- 'spec/**/*'
Metrics/CyclomaticComplexity:
Max: 10
Exclude:
- 'spec/**/*'
Metrics/PerceivedComplexity:
Max: 10
Exclude:
- 'spec/**/*'
Metrics/ParameterLists:
Max: 8
RSpec/ExampleLength:
Max: 12
RSpec/MultipleExpectations:
Max: 3
RSpec/MultipleMemoizedHelpers:
Max: 7
RSpec/NestedGroups:
Max: 4