/
.rubocop.yml
89 lines (73 loc) · 2.45 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
inherit_from: .rubocop_todo.yml
AllCops:
# You can run the authlogic test suite with any supported version of MRI, but the
# linter will only care about this `TargetRubyVersion`. This should be set to the
# lowest version of MRI that authlogic supports.
TargetRubyVersion: 2.1
# Please use normal indentation when aligning parameters.
#
# Good:
#
# method_call(
# a,
# b
# )
#
# method_call(a,
# b
# )
#
# Bad:
#
# method_call(a,
# b)
#
# The latter is harder to maintain and uses too much horizontal space.
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
# This project uses rails-style method indentation, ie. indent after `private`.
Layout/IndentationConsistency:
EnforcedStyle: rails
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
# Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
Metrics/BlockLength:
Enabled: false
# Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
Metrics/ClassLength:
Enabled: false
# Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
Metrics/MethodLength:
Enabled: false
# Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
Metrics/ModuleLength:
Enabled: false
# Sometimes prefixing a method name with get_ or set_ is a reasonable choice.
Naming/AccessorMethodName:
Enabled: false
# Having a consistent delimiter, like EOS, improves reading speed. The delimiter
# is syntactic noise, just like a quotation mark, and inconsistent naming would
# hurt reading speed, just as inconsistent quoting would.
Naming/HeredocDelimiterNaming:
Enabled: false
# Avoid single-line method definitions.
Style/EmptyMethod:
EnforcedStyle: expanded
# Too subtle to lint. Guard clauses are great, use them if they help.
Style/GuardClause:
Enabled: false
# Too subtle to lint. A multi-line conditional may improve readability, even if
# a postfix conditional would satisfy `Metrics/LineLength`.
Style/IfUnlessModifier:
Enabled: false
# Too subtle to lint. Use semantic style, but prefer `}.x` over `end.x`.
Style/BlockDelimiters:
Enabled: false
# Use the nested style because it is safer. It is easier to make mistakes with
# the compact style.
Style/ClassAndModuleChildren:
EnforcedStyle: nested
# Both `module_function` and `extend_self` are legitimate. Most importantly,
# they are different (http://bit.ly/2hSQAGm)
Style/ModuleFunction:
Enabled: false