-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
169 lines (138 loc) · 5.16 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
169
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
Style/Alias:
EnforcedStyle: prefer_alias_method
Metrics/LineLength:
Max: 100
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Style/AlignParameters:
# Alignment of parameters in multi-line method calls.
#
# The `with_first_parameter` style aligns the following lines along the same
# column as the first parameter.
#
# method_call(a,
# b)
#
# The `with_fixed_indentation` style aligns the following lines with one
# level of indentation relative to the start of the line with the method call.
#
# method_call(a,
# b)
EnforcedStyle: with_fixed_indentation
# Indentation of `when`.
Style/CaseIndentation:
IndentWhenRelativeTo: end
# This usually but not always does what we want; disable in individual places
# where it gets it wrong
Style/ClassAndModuleChildren:
EnforcedStyle: compact
# Checks formatting of special comments
Style/CommentAnnotation:
Enabled: false
Style/Copyright:
Enabled: false
Style/EmptyLineBetweenDefs:
# If true, this parameter means that single line method definitions don't
# need an empty line between them.
AllowAdjacentOneLineDefs: true
Style/EmptyLinesAroundClassBody:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/FileName:
# When true, requires that each source file should define a class or module
# with a name which matches the file name (converted to ... case).
# It further expects it to be nested inside modules which match the names
# of subdirectories in its path.
ExpectMatchingDefinition: false
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
MaxLineLength: 100
# Checks the indentation of the first element in an array literal.
Style/IndentArray:
# The value `special_inside_parentheses` means that array literals with
# brackets that have their opening bracket on the same line as a surrounding
# opening round parenthesis, shall have their first element indented relative
# to the first position inside the parenthesis.
#
# The value `consistent` means that the indentation of the first element shall
# always be relative to the first position of the line where the opening
# bracket is.
#
# The value `align_brackets` means that the indentation of the first element
# shall always be relative to the position of the opening bracket.
EnforcedStyle: consistent
# Checks the indentation of the first key in a hash literal.
Style/IndentHash:
# The value `special_inside_parentheses` means that hash literals with braces
# that have their opening brace on the same line as a surrounding opening
# round parenthesis, shall have their first key indented relative to the
# first position inside the parenthesis.
#
# The value `consistent` means that the indentation of the first key shall
# always be relative to the first position of the line where the opening
# brace is.
#
# The value `align_braces` means that the indentation of the first key shall
# always be relative to the position of the opening brace.
EnforcedStyle: consistent
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/MultilineOperationIndentation:
EnforcedStyle: indented
Style/Next:
Enabled: false
Style/RedundantReturn:
# When true allows code like `return x, y`.
AllowMultipleReturnValues: true
# Use / or %r around regular expressions.
Style/RegexpLiteral:
# If false, the cop will always recommend using %r if one or more slashes
# are found in the regexp string.
AllowInnerSlashes: true
Style/Semicolon:
# Allow ; to separate several expressions on the same line.
AllowAsExpressionSeparator: true
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: false
Style/SymbolArray:
EnforcedStyle: brackets
Style/WhileUntilModifier:
MaxLineLength: 100
# checks whether the end keywords are aligned properly for `do` `end` blocks.
Lint/BlockAlignment:
# The value `start_of_block` means that the `end` should be aligned with line
# where the `do` keyword appears.
# The value `start_of_line` means it should be aligned with the whole
# expression's starting line.
# The value `either` means both are allowed.
AlignWith: start_of_line
# Align ends correctly.
Lint/EndAlignment:
# The value `keyword` means that `end` should be aligned with the matching
# keyword (if, while, etc.).
# The value `variable` means that in assignments, `end` should be aligned
# with the start of the variable on the left hand side of `=`. In all other
# situations, `end` should still be aligned with the keyword.
# The value `start_of_line` means that `end` should be aligned with the start
# of the line which the matching keyword appears on.
AlignWith: start_of_line
Lint/DefEndAlignment:
# The value `def` means that `end` should be aligned with the def keyword.
# The value `start_of_line` means that `end` should be aligned with method
# calls like `private`, `public`, etc, if present in front of the `def`
# keyword on the same line.
AlignWith: def
Performance/RedundantMerge:
Enabled: false