-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.rubocop.yml
166 lines (149 loc) · 6.85 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
AllCops:
NewCops: disable
SuggestExtensions: false
TargetRubyVersion: 2.7
#
# our rules
#
Layout/FirstArrayElementIndentation: { Exclude: ['spec/**/*'] }
Layout/LineLength: { Enabled: false }
Layout/SpaceAroundEqualsInParameterDefault: { EnforcedStyle: no_space }
Lint/ConstantDefinitionInBlock: { Exclude: ['spec/**/*'] }
Metrics: { Enabled: false }
Style/SymbolArray: { EnforcedStyle: brackets }
Style/IfInsideElse: { Enabled: false } # Offense count: 1
Style/PercentLiteralDelimiters:
Enabled: true
PreferredDelimiters:
default: '{}'
'%i': '[]'
'%I': '[]'
'%w': '[]'
'%W': '[]'
Style/UnlessElse: { Enabled: false }
#
# rules that are in flux
#
# consider enabling these and autocorrecting?
# Layout/SpaceAfterComma
# Layout/SpaceAroundKeyword
# Layout/SpaceBeforeComma
# Layout/SpaceInsideHashLiteralBraces
# Layout/SpaceInsideParens
# Layout/TrailingWhitespace
# Lint/UnreachableLoop
# Lint/UnusedBlockArgument
# Style/ClassCheck
# Style/Documentation
# Style/ExpandPathArguments
# Style/GlobalStdStream
# Style/HashSyntax
# Style/KeywordParametersOrder
# Style/MethodCallWithoutArgsParentheses
# Style/MutableConstant
# Style/QuotedSymbols: { EnforcedStyle: double_quotes }
# Style/RedundantReturn
# Style/SafeNavigation
# Style/SpecialGlobalVars
# Style/StringLiterals: { EnforcedStyle: double_quotes }
# Style/WordArray
# these have been fixed
# Gemspec/DuplicatedAssignment: { Enabled: false } # Offense count: 1
# Layout/ElseAlignment: { Enabled: false } # Offense count: 1
# Layout/EndAlignment: { Enabled: false } # Offense count: 1
# Lint/DuplicateMethods: { Enabled: false } # Offense count: 1
# Lint/UselessAssignment: { Enabled: false } # Offense count: 1
# Style/Encoding: { Enabled: false } # Offense count: 2
# Style/RedundantBegin: { Enabled: false } # Offense count: 2
# Style/RedundantInterpolation: { Enabled: false } # Offense count: 1
# Style/TrailingCommaInArrayLiteral: { Enabled: false } # Offense count: 1
#
# This list was generated with:
# bundle exec rubocop --auto-gen-config --exclude-limit 1
#
# > 10 violations
Layout/AssignmentIndentation: { Enabled: false } # Offense count: 11
Layout/EmptyLinesAroundClassBody: { Enabled: false } # Offense count: 76
Layout/HashAlignment: { Enabled: false } # Offense count: 28
Layout/SpaceAfterComma: { Enabled: false } # Offense count: 141
Layout/SpaceInsideHashLiteralBraces: { Enabled: false } # Offense count: 57
Layout/TrailingWhitespace: { Enabled: false } # Offense count: 50
Naming/RescuedExceptionsVariableName: { Enabled: false } # Offense count: 11
Style/BlockDelimiters: { Enabled: false } # Offense count: 17
Style/ClassCheck: { Enabled: false } # Offense count: 10
Style/ClassEqualityComparison: { Enabled: false } # Offense count: 16
Style/GlobalStdStream: { Enabled: false } # Offense count: 13
Style/GuardClause: { Enabled: false } # Offense count: 10
Style/IfUnlessModifier: { Enabled: false } # Offense count: 13
Style/MethodCallWithoutArgsParentheses: { Enabled: false } # Offense count: 10
Style/SpecialGlobalVars: { Enabled: false } # Offense count: 28
Style/StringLiterals: { Enabled: false } # Offense count: 774
Lint/ElseLayout: { Enabled: false } # Offense count: 22
# < 10 violations
Layout/EmptyLinesAroundModuleBody: { Enabled: false } # Offense count: 5
Layout/ExtraSpacing: { Enabled: false } # Offense count: 6
Layout/FirstHashElementIndentation: { Enabled: false } # Offense count: 4
Layout/ParameterAlignment: { Enabled: false } # Offense count: 9
Layout/SpaceAroundKeyword: { Enabled: false } # Offense count: 7
Layout/SpaceBeforeComma: { Enabled: false } # Offense count: 4
Layout/SpaceInsideParens: { Enabled: false } # Offense count: 4
Lint/EmptyClass: { Enabled: false } # Offense count: 3
Lint/SuppressedException: { Enabled: false } # Offense count: 4
Lint/UnusedMethodArgument: { Enabled: false } # Offense count: 5
Style/AccessorGrouping: { Enabled: false } # Offense count: 7
Style/Documentation: { Enabled: false } # Offense count: 3
Style/ExpandPathArguments: { Enabled: false } # Offense count: 8
Style/HashSyntax: { Exclude: ['Rakefile'] } # Offense count: 3
Style/KeywordParametersOrder: { Enabled: false } # Offense count: 8
Style/Lambda: { Enabled: false } # Offense count: 3
Style/MutableConstant: { Enabled: false } # Offense count: 4
Style/RaiseArgs: { Enabled: false } # Offense count: 4
Style/RedundantReturn: { Enabled: false } # Offense count: 7
Style/SafeNavigation: { Enabled: false } # Offense count: 5
Style/StringConcatenation: { Enabled: false } # Offense count: 8
Style/WordArray: { Enabled: false } # Offense count: 4
# 1 or 2 violations
Layout/ArgumentAlignment: { Enabled: false } # Offense count: 1
Layout/BlockAlignment: { Enabled: false } # Offense count: 1
Layout/IndentationWidth: { Enabled: false } # Offense count: 2
Layout/SpaceAroundOperators: { Enabled: false } # Offense count: 1
Layout/SpaceBeforeBlockBraces: { Enabled: false } # Offense count: 1
Lint/MissingSuper: { Enabled: false } # Offense count: 2
Lint/RescueException: { Enabled: false } # Offense count: 1
Lint/UnreachableLoop: { Enabled: false } # Offense count: 1
Lint/UnusedBlockArgument: { Enabled: false } # Offense count: 1
Naming/MethodParameterName: { Enabled: false } # Offense count: 1
Style/EmptyMethod: { Enabled: false } # Offense count: 2
Style/HashConversion: { Enabled: false } # Offense count: 1
Style/MultilineMemoization: { Enabled: false } # Offense count: 1
Style/NumericPredicate: { Enabled: false } # Offense count: 1
Style/OptionalArguments: { Enabled: false } # Offense count: 1
Style/ParenthesesAroundCondition: { Enabled: false } # Offense count: 1
Style/PreferredHashMethods: { Enabled: false } # Offense count: 1
Style/QuotedSymbols: { Enabled: false } # Offense count: 1
Style/RedundantException: { Enabled: false } # Offense count: 1
Style/RedundantRegexpEscape: { Enabled: false } # Offense count: 1
Style/RegexpLiteral: { Enabled: false } # Offense count: 1
Style/RescueStandardError: { Enabled: false } # Offense count: 1
Style/SoleNestedConditional: { Enabled: false } # Offense count: 1
Style/TrailingCommaInHashLiteral: { Enabled: false } # Offense count: 2
# enforce frozen_string_literal for lib/, but not examples/ or spec/.
Style/FrozenStringLiteralComment:
Exclude:
- 'examples/{**/,}*.rb'
- 'spec/spec_helper.rb'
- 'spec/{**/,}*_spec.rb'
# rubocop cannot tell that rubygems_mfa_required is enabled in gemspec.yml
Gemspec/RequireMFA: { Enabled: false }
# make an exception for our gemspec code
Gemspec/DuplicatedAssignment:
Exclude:
- 'command_kit.gemspec'
Bundler/OrderedGems: { Enabled: false }
# rubocup is not aware of vertical alignment of matrixes (Array of Arrays).
Layout/SpaceInsideArrayLiteralBrackets: { Enabled: false }
Naming/HeredocDelimiterNaming: { Enabled: false }
# I prefer to use explicit parenthesis for compound logical statements
Style/RedundantParentheses: { Enabled: false }
# I prefer to call `super()` with explicit arguments
Style/SuperArguments: { Enabled: false }