-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.rubocop.yml
117 lines (92 loc) · 2.76 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
114
115
116
117
require:
- rubocop-rspec
- rubocop-performance
- rubocop-rails
AllCops:
NewCops: enable
TargetRubyVersion: 2.6.6
DisplayCopNames: true
Exclude:
- Rakefile
- cache/**/*
- bin/**/*
- spec/dummy/**/*
Metrics/BlockLength:
Exclude:
- spec/**/*
# Enforces empty line after multiline condition.
Layout/EmptyLineAfterMultilineCondition:
Enabled: true
# Checks for a line break before the first element in a multi-line array.
Layout/FirstArrayElementLineBreak:
Enabled: true
# Checks for a line break before the first element in a multi-line hash.
Layout/FirstHashElementLineBreak:
Enabled: true
# Checks that each item in a multi-line array literal starts on a separate line.
Layout/MultilineArrayLineBreaks:
Enabled: true
# Check for a newline after the assignment operator in multi-line assignments.
Layout/MultilineAssignmentLayout:
Enabled: true
# Checks that each item in a multi-line hash literal starts on a separate line.
Layout/MultilineHashKeyLineBreaks:
Enabled: true
# Checks that each argument in a multi-line method call starts on a separate line.
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
# Checks unsafe usage of number conversion methods.
Lint/NumberConversion:
Enabled: true
# Enforces using `def self.method_name` or `class << self` to define class methods.
Style/ClassMethodsDefinitions:
Enabled: true
EnforcedStyle: self_class
# Check that class- and module constants have visibility declarations.
Style/ConstantVisibility:
Enabled: true
# Document classes and non-namespace modules.
Style/Documentation:
Enabled: true
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/dirty_seed/engine.rb'
- 'lib/dirty_seed.rb'
# Checks for missing documentation comment for public methods.
Style/DocumentationMethod:
Enabled: true
RequireForNonPublicMethods: true
# Avoid trailing inline comments.
Style/InlineComment:
Enabled: true
# Avoid chaining a method call on a do...end block.
Style/MethodCalledOnDoEndBlock:
Enabled: true
# Avoid multi-line method signatures.
Style/MultilineMethodSignature:
Enabled: true
# Don't use option hashes when you can use keyword arguments.
Style/OptionHash:
Enabled: true
# Use return instead of return nil.
Style/ReturnNil:
Enabled: true
# Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.
Style/Send:
Enabled: true
# Prefer symbols instead of strings as hash keys.
Style/StringHashKeys:
Enabled: true
# Checks for useless trailing commas in block arguments.
Style/TrailingCommaInBlockArgs:
Enabled: true
# Allow more lines in specs
RSpec/ExampleLength:
Max: 8
# Allow more nesting for detailed specs
RSpec/NestedGroups:
Max: 5
# Allow more expectations in one spec
RSpec/MultipleExpectations:
Max: 3