-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
107 lines (82 loc) · 2.24 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
# Rubocop, we're buddies and all, but we're going to have to disagree on the following -
# Allow compact class definitions
Style/ClassAndModuleChildren:
Enabled: false
# Allow if statements!
Style/GuardClause:
Enabled: false
# Allow more complex ruby methods
Metrics/AbcSize:
Max: 100
# you cant determine complexity!
PerceivedComplexity:
Enabled: false
# Disable requirement of "encoding" headers on files
Encoding:
Enabled: false
# Increase line length, we're not on VT220s anymore
LineLength:
Max: 255
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
URISchemes:
- http
- https
# Longer classes aren't _so_ bad
Metrics/ClassLength:
Max: 125
# Increase allowed lines in a method. Short methods are good, but 10 lines
# is a bit too low.
MethodLength:
CountComments: false # count full line comments?
Max: 40
# Favor explicit over implicit code: don't complain of "redundant returns"
RedundantReturn:
Enabled: false
# Don't complain about if/unless modifiers. The merit of this is debatable
# and it will likely require building of over-length lines.
IfUnlessModifier:
Enabled: false
# Raise allowed CyclomaticComplexity & Perceivedto 10.
CyclomaticComplexity:
Max: 15
Metrics/PerceivedComplexity:
Max: 15
# Don't force a word array unless 5 elements
WordArray:
MinSize: 5
# Don't complain about unused block args
UnusedBlockArgument:
Enabled: false
# allow both hash syntaxes
Style/HashSyntax:
Enabled: false
# allow final rescue
Style/RescueModifier:
Enabled: false
Style/AccessorMethodName:
Enabled: false
# allow larger modules
Metrics/ModuleLength:
Max: 150
# disable opinionated doc requirements such as a top-level class comments
Documentation:
Enabled: false
# allow using parenthases to group an expresion
Lint/ParenthesesAsGroupedExpression:
Enabled: false
# NumericLiterals:
# Enabled: false
# allow multiple spaces between methofs and first arg
Style/SpaceBeforeFirstArg:
Enabled: false
# There are too many non-ruby files that run up against rubocop rules in a cookbook
AllCops:
Include:
- '**/*.rb'
# allow longer blocks
Metrics/BlockLength:
Max: 50
# allow longer argument lists
Metrics/ParameterLists:
Max: 6