-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
168 lines (126 loc) · 3.58 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# This is the default configuration file with all checking enabled. It is also
# the configuration used to check the rubocop source code.
# Use UTF-8 as the source file encoding.
Encoding:
Enabled: false
# Limit lines to 80 characters.
LineLength:
Enabled: false
Max: 79
# No hard tabs.
Tab:
Enabled: true
# Avoid trailing whitespace.
TrailingWhitespace:
Enabled: true
# Use two spaces per indentation level.
Indentation:
Enabled: true
# Use empty lines between defs and to break up a method into logical paragraphs.
EmptyLines:
Enabled: true
# Use spaces around operators.
SpaceAroundOperators:
Enabled: true
# Use spaces around { and before }.
SpaceAroundBraces:
Enabled: true
# No spaces after ( or before ).
SpaceInsideParens:
Enabled: true
# No spaces after [ or before ].
SpaceInsideBrackets:
Enabled: true
# Use spaces after commas.
SpaceAfterComma:
Enabled: true
# Use spaces after semicolons.
SpaceAfterSemicolon:
Enabled: true
# Use spaces after colons.
SpaceAfterColon:
Enabled: true
# Prefer symbols instead of strings as hash keys.
HashSyntax:
Enabled: true
# Use Unix-style line endings.
EndOfLine:
Enabled: true
# Add underscores to large numeric literals to improve their readability.
NumericLiterals:
Enabled: true
# Align the parameters of a method call if they span more than one line.
AlignParameters:
Enabled: true
# Use def with parentheses when there are arguments.
DefWithParentheses:
Enabled: true
# Omit the parentheses when the method doesn't accept any arguments.
DefWithoutParentheses:
Enabled: true
IfWithSemicolon:
Enabled: true
MultilineIfThen:
Enabled: true
OneLineConditional:
Enabled: true
# Avoid using {...} for multi-line blocks (multiline chaining is always ugly).
MultilineBlocks:
Enabled: true
# Prefer {...} over do...end for single-line blocks.
SingleLineBlocks:
Enabled: true
# Avoid parameter lists longer than three or four parameters.
ParameterLists:
Enabled: true
# Prefer ' strings when you don't need string interpolation or special symbols.
StringLiterals:
Enabled: true
# Avoid multi-line ?: (the ternary operator); use if/unless instead.
MultilineTernaryOperator:
Enabled: true
# Use one expression per branch in a ternary operator.
NestedTernaryOperator:
Enabled: true
# Never use unless with else. Rewrite these with the positive case first.
UnlessElse:
Enabled: true
# Use &&/|| for boolean expressions, and/or for control flow.
AmpersandsPipesVsAndOr:
Enabled: true
# Use when x then ... for one-line cases.
WhenThen:
Enabled: true
# Favor modifier if/unless usage when you have a single-line body.
IfUnlessModifier:
Enabled: true
# Favor modifier while/until usage when you have a single-line body.
WhileUntilModifier:
Enabled: true
# Favor unless over if for negative conditions (or control flow or).
FavorUnlessOverNegatedIf:
Enabled: true
# Favor until over while for negative conditions.
FavorUntilOverNegatedWhile:
Enabled: true
# Use spaces around the = operator when assigning default values in def params.
SpaceAroundEqualsInParameterDefault:
Enabled: true
# Use the new lambda literal syntax.
NewLambdaLiteral:
Enabled: true
# Don't use parentheses around the condition of an if/unless/while.
ParenthesesAroundCondition:
Enabled: true
# Use snake_case for symbols, methods and variables.
MethodAndVariableSnakeCase:
Enabled: true
# Use CamelCase for classes and modules.
ClassAndModuleCamelCase:
Enabled: true
# Causes Ruby to check the syntax of the script and exit without executing.
Syntax:
Enabled: false
# Preferred collection methods.
CollectionMethods:
Enabled: true