-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy path.rubocop.yml
108 lines (83 loc) · 2.17 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
AllCops:
Include:
- 'lib/unparser.rb'
- 'lib/unparser/**/*.rb'
- '**/*.rake'
- 'Gemfile'
- 'Gemfile.triage'
TargetRubyVersion: 3.0
Exclude:
- tmp/**/*
- vendor/**/*
NewCops: enable
# Avoid parameter lists longer than five parameters.
Metrics/ParameterLists:
Max: 3
CountKeywordArgs: true
Metrics/MethodLength:
CountComments: false
Max: 17
Metrics/AbcSize:
Max: 18
# Avoid more than `Max` levels of nesting.
Metrics/BlockNesting:
Max: 3
# Align with the style guide.
Style/CollectionMethods:
PreferredMethods:
collect: 'map'
inject: 'reduce'
find: 'detect'
find_all: 'select'
# Use `fail` as `raise` implies re-raising
Style/SignalException:
EnforcedStyle: semantic
# Limit line length
Layout/LineLength:
Max: 113 # TODO: lower to 79 once the rubocop branch in shared/Gemfile is removed
Metrics/ClassLength:
Max: 205
# Prefer modifiers and explicit if statements over returning early for small methods
Style/GuardClause:
Enabled: false
Metrics/BlockLength:
Exclude:
# Ignore RSpec DSL
- spec/**/*
# Flags freezes for singletons that could still be mutated like Regexps
Style/RedundantFreeze:
Enabled: false
# Disabled because of indenting with private keyword in class bodies.
Layout/IndentationWidth:
Enabled: false
# Disable documentation checking until a class needs to be documented once
Style/Documentation:
Enabled: false
# Do not favor modifier if/unless usage when you have a single-line body
Style/IfUnlessModifier:
Enabled: false
# I like to have an empty line before closing the currently opened body
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# I like my style more
Layout/AccessModifierIndentation:
Enabled: false
Style/CommentedKeyword:
Enabled: false
Style/MixinGrouping:
Enabled: false
Lint/BooleanSymbol:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Naming/RescuedExceptionsVariableName:
Enabled: false
Layout/MultilineMethodCallIndentation:
Enabled: false