forked from collectiveidea/delayed_job_active_record
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
151 lines (113 loc) · 2.83 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Load the rubocop-rspec gem
require: rubocop-rspec
Rails:
Enabled: true
AllCops:
Exclude:
- lib/**/templates/*
- vendor/**/*
#################
# [i] Overrides #
#################
Style/CollectionMethods:
Enabled: true
# Mapping from undesired method to desired_method
# e.g. to use `detect` over `find`:
#
# CollectionMethods:
# PreferredMethods:
# find: detect
PreferredMethods:
reduce: 'inject'
find: 'detect'
each_with_index: 'each.with_index'
Style/EmptyMethod:
EnforcedStyle: expanded
# Align ends correctly.
EndAlignment:
EnforcedStyleAlignWith: variable
LineLength:
Max: 120
SignalException:
EnforcedStyle: only_raise
SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: true
SpaceInsideHashLiteralBraces:
EnforcedStyle: space
BracesAroundHashParameters:
EnforcedStyle: context_dependent
StringLiterals:
EnforcedStyle: double_quotes
#################
# Disabled cops #
#################
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/FormatString:
Enabled: false
Style/Lambda:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%w": "[]"
"%W": "[]"
"%i": "[]"
"%I": "[]"
Style/Semicolon:
Enabled: false
Style/SingleLineBlockParams:
Enabled: false
Style/WordArray:
Enabled: false
# HABTM still has a place.
# http://collectiveidea.com/blog/archives/2014/08/11/has_and_belongs_to_many-isnt-dead/
Rails/HasAndBelongsToMany:
Enabled: false
# enforces using the class name in a describe block (e.g. `describe TestedClass do`)
RSpec/DescribeClass:
Enabled: false
# enforces using the described_class variablea (`described_class` instead of MyClass)
RSpec/DescribedClass:
Enabled: false
# RSpec examples are ok if they're long.
# Explicitness is better than cleverness in tests.
RSpec/ExampleLength:
Enabled: false
# enforces using either `expect` or `allow` for stubs. Since they do differnet things,
# we should let the developer decide which to use
RSpec/MessageExpectation:
Enabled: false
# enforces having only one `expect` per test
RSpec/MultipleExpectations:
Enabled: false
# enforces rules about how many nested `describe` blocks are allowed
RSpec/NestedGroups:
Enabled: false
# enforces rules about using `it` or `describe` block methods instead of `feature` or `scenario`
Capybara/FeatureMethods:
Enabled: false
###################
# Local overrides #
###################
Rails/ApplicationRecord:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Security/YAMLLoad:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/NumericPredicate:
Enabled: false