-
Notifications
You must be signed in to change notification settings - Fork 3
/
.rubocop.yml
131 lines (100 loc) · 3.02 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
AllCops:
TargetRubyVersion: 2.3
Exclude:
- tmp/**/*
- gemfiles/**/*
#---------------------------------------------
# Layout
#---------------------------------------------
# Hashes do not need padding
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
# Allow 2 space indentation for when inside a case
Layout/CaseIndentation:
Enabled: false
# Allow empty lines in classes
Layout/EmptyLinesAroundClassBody:
Enabled: false
# Allow multiple spaces before first argument
Layout/SpaceBeforeFirstArg:
Enabled: false
# Allow extra spacing, e.g. to align components
Layout/ExtraSpacing:
Enabled: false
# Usually good, but in some cases not possible
Layout/AlignHash:
Enabled: false
# Allow an empty line after do / before end
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Again, generally a good idea, but it has problems with multiline operations in
# combination with assignments
Layout/MultilineOperationIndentation:
Enabled: false
# See the corresponding other cops
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/SpaceInLambdaLiteral:
Enabled: false
#---------------------------------------------
# Metrics
#---------------------------------------------
# Allow bigger classes
Metrics/ClassLength:
Enabled: false
Metrics/LineLength:
Max: 120
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
AllowHeredoc: true
AllowURI: true
Metrics/BlockLength:
Max: 75
Exclude:
- spec/**/*.rb
# Allow longer methods
Metrics/MethodLength:
Enabled: false
# Allow bigger modules
Metrics/ModuleLength:
Enabled: false
#---------------------------------------------
# Naming
#---------------------------------------------
Naming/HeredocDelimiterNaming:
Enabled: false
#---------------------------------------------
# Style
#---------------------------------------------
# Allow fail() for initial exception, raise() for re-raise
# It seems that the cop decision was mainly based on "more people use raise than fail"...
Style/SignalException:
Enabled: false
# Allow assigning multiple variables in one line.
# This should not be overused, but comes in handy when assigning initializer values to instance variables
Style/ParallelAssignment:
Enabled: false
# Depending on the situation, it might make more sense to use
# [:symbol1, :symbol2] over %i[symbol1 symbol2], e.g. for multiline aligning reasons.
Style/SymbolArray:
Enabled: false
# Not all modules have to have top level comments
Style/Documentation:
Enabled: false
# Allow class variable usage
Style/ClassVars:
Enabled: false
# Allow block comments
Style/BlockComments:
Enabled: false
# Allow the use of !! (conversion of nil/object to true/false)
Style/DoubleNegation:
Enabled: false
# Allow unless/if blocks even for one-liners
Style/IfUnlessModifier:
Enabled: false
Style/GuardClause:
Enabled: false
Style/MissingRespondToMissing:
Exclude:
- lib/setting_accessors/setting_scaffold.rb