-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
107 lines (82 loc) · 1.94 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
---
inherit_from: .rubocop_todo.yml
require: rubocop-performance
AllCops:
Exclude:
- db/schema.rb
- db/seeds.rb
- bin/*
- config/initializers/simple_form_bootstrap.rb
Layout/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
# Chunk oneliners together
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line
AutoCorrect: true
Layout/ExtraSpacing:
AllowBeforeTrailingComments: true
ForceEqualSignAlignment: true
Layout/IndentFirstArgument:
EnforcedStyle: consistent
#
# Multline Config:
# matching C-style for array, hash, method def and call
#
# stops ugly indent for x = if... and similar
Layout/MultilineAssignmentLayout:
Enabled: true
# similar balance to end and }
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/FirstHashElementLineBreak:
Enabled: true
# Compacter to associate parameter and value
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# make diffs easier when adding new item
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/ClassAndModuleChildren:
Enabled: false
# make diffs easier when adding new item
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Metrics/LineLength:
Exclude:
- Gemfile
Max: 120
AutoCorrect: true
AllowHeredoc: true
AllowURI: true
#
# Disabled Cops
#
Bundler/OrderedGems:
Enabled: false
Gemspec/OrderedDependencies:
Enabled: false
Style/AsciiComments:
Enabled: false
#
# Warnings Only
#
Style/IfUnlessModifier:
Severity: warning
AutoCorrect: false
Metrics/BlockLength:
Exclude:
- spec/**/*
Metrics/ParameterLists:
Exclude:
- spec/**/*