forked from jeffcarbs/omniauth-office365
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.rubocop.yml
181 lines (159 loc) · 5.27 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
170
171
172
173
174
175
176
177
178
179
180
181
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
SupportedStyles:
- with_first_parameter
- with_fixed_indentation
Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent
SupportedStyles:
# The `braces` style enforces braces around all method parameters that are
# hashes.
- braces
# The `no_braces` style checks that the last parameter doesn't have braces
# around it.
- no_braces
# The `context_dependent` style checks that the last parameter doesn't have
# braces around it, but requires braces if the second to last parameter is
# also a hash literal.
- context_dependent
# Indentation of `when`.
Style/CaseIndentation:
EnforcedStyle: end
SupportedStyles:
- case
- end
IndentOneStep: false
Style/ClassAndModuleChildren:
# Checks the style of children definitions at classes and modules.
#
# Basically there are two different styles:
#
# `nested` - have each child on a separate line
# class Foo
# class Bar
# end
# end
#
# `compact` - combine definitions as much as possible
# class Foo::Bar
# end
#
# The compact style is only forced, for classes / modules with one child.
EnforcedStyle: nested
SupportedStyles:
- nested
- compact
Enabled: false
Style/CommandLiteral:
EnforcedStyle: mixed
# backticks: Always use backticks.
# percent_x: Always use %x.
# mixed: Use backticks on single-line commands, and %x on multi-line commands.
SupportedStyles:
- backticks
- percent_x
- mixed
# If false, the cop will always recommend using %x if one or more backticks
# are found in the command string.
AllowInnerBackticks: false
Style/HashSyntax:
EnforcedStyle: hash_rockets
SupportedStyles:
- ruby19
- hash_rockets
# 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
SupportedStyles:
- special_inside_parentheses
- consistent
- align_brackets
# By default, the indentation width from Style/IndentationWidth is used
# But it can be overridden by setting this parameter
IndentationWidth: ~
# 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.
EnforcedStyle: consistent
SupportedStyles:
- special_inside_parentheses
- consistent
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
SupportedStyles:
- aligned
- indented
# By default, the indentation width from Style/IndentationWidth is used
# But it can be overridden by setting this parameter
IndentationWidth: ~
Style/MultilineOperationIndentation:
EnforcedStyle: indented
SupportedStyles:
- aligned
- indented
Style/SymbolProc:
IgnoredMethods:
- proc
- respond_to
# Enforces: "Provide an exception class and message as arguments to raise."
# Overly restrictive when testing ActiveRecord errors
# EG: ActiveRecord::RecordInvalid.new(model_with_errs) doesn't take a message
Style/RaiseArgs:
Enabled: false
##################### Metrics #############################
Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 100
Enabled: false
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 10
Enabled: false
Metrics/LineLength:
Max: 120
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
##################### Lint ################################
Lint/AssignmentInCondition:
Description: "Don't use assignment in conditions."
Enabled: false
##################### Performance #########################
# Performance improvement is negligible and the readability is poor. See:
# https://github.com/bbatsov/rubocop/issues/2614
Performance/Casecmp:
Enabled: false
##################### Rails ###############################
Rails/ActionFilter:
Description: 'Enforces consistent use of action filter methods.'
Enabled: false