-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
.rubocop.yml
232 lines (231 loc) · 5.24 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# This file is synced from `Homebrew/brew` by the `.github` repository, do not modify it directly.
---
AllCops:
TargetRubyVersion: 3.3
NewCops: enable
Include:
- "**/*.rbi"
Exclude:
- Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi
- Homebrew/bin/*
- Homebrew/vendor/**/*
- Taps/*/*/vendor/**/*
- "**/vendor/**/*"
SuggestExtensions:
rubocop-minitest: false
Layout/ArgumentAlignment:
Exclude:
- Taps/*/*/*.rb
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"
Layout/CaseIndentation:
EnforcedStyle: end
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Layout/LeadingCommentSpace:
Exclude:
- Taps/*/*/cmd/*.rb
Layout/LineLength:
Max: 118
AllowedPatterns:
- "#: "
- ' url "'
- ' mirror "'
- " plist_options "
- ' executable: "'
- ' font "'
- ' homepage "'
- ' name "'
- ' pkg "'
- ' pkgutil: "'
- " sha256 cellar: "
- " sha256 "
- "#{language}"
- "#{version."
- ' "/Library/Application Support/'
- "\"/Library/Caches/"
- "\"/Library/PreferencePanes/"
- ' "~/Library/Application Support/'
- "\"~/Library/Caches/"
- "\"~/Library/Containers"
- "\"~/Application Support"
- " was verified as official when first introduced to the cask"
Layout/SpaceAroundOperators:
Enabled: false
Layout/SpaceBeforeBrackets:
Exclude:
- "**/*_spec.rb"
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
Lint/AmbiguousBlockAssociation:
Enabled: false
Lint/DuplicateBranch:
Exclude:
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
Lint/ParenthesesAsGroupedExpression:
Exclude:
- Taps/*/*/*.rb
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
Metrics:
Enabled: false
Naming/BlockForwarding:
Enabled: false
Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
- END, EOD, EOF
Naming/InclusiveLanguage:
CheckStrings: true
FlaggedTerms:
slave:
AllowedRegex:
- gitslave
- log_slave
- ssdb_slave
- var_slave
- patches/13_fix_scope_for_show_slave_status_data.patch
Naming/MethodName:
AllowedPatterns:
- "\\A(fetch_)?HEAD\\?\\Z"
Naming/MethodParameterName:
inherit_mode:
merge:
- AllowedNames
Naming/VariableNumber:
Enabled: false
Style/AndOr:
EnforcedStyle: always
Style/ArgumentsForwarding:
Enabled: false
Style/AutoResourceCleanup:
Enabled: true
Style/BarePercentLiterals:
EnforcedStyle: percent_q
Style/BlockDelimiters:
BracesRequiredMethods:
- sig
Style/ClassAndModuleChildren:
Exclude:
- "**/*.rbi"
Style/CollectionMethods:
Enabled: true
Style/DisableCopsWithinSourceCodeDirective:
Enabled: true
Include:
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
Style/Documentation:
Exclude:
- Taps/**/*
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
- "**/*.rbi"
Style/EmptyMethod:
Exclude:
- "**/*.rbi"
Style/FetchEnvVar:
Exclude:
- Taps/*/*/*.rb
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Exclude:
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
- Homebrew/test/**/Casks/**/*.rb
- "**/*.rbi"
- "**/Brewfile"
Style/GuardClause:
Exclude:
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
Style/HashAsLastArrayItem:
Exclude:
- Taps/*/*/*.rb
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"
Style/InverseMethods:
InverseMethods:
:blank?: :present?
Style/InvertibleUnlessCondition:
Enabled: true
InverseMethods:
:==: :!=
:zero?:
:blank?: :present?
Style/MutableConstant:
EnforcedStyle: strict
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
Style/NumericLiterals:
MinDigits: 7
Strict: true
Exclude:
- "**/Brewfile"
Style/OpenStructUse:
Exclude:
- Taps/**/*
- Homebrew/cli/args.rb
- Homebrew/cli/args.rbi
Style/OptionalBooleanParameter:
AllowedMethods:
- respond_to?
- respond_to_missing?
Style/RedundantLineContinuation:
Enabled: false
Style/RescueStandardError:
EnforcedStyle: implicit
Style/ReturnNil:
Enabled: true
Style/StderrPuts:
Enabled: false
Style/StringConcatenation:
Exclude:
- Taps/*/*/*.rb
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/StringMethods:
Enabled: true
Style/SuperWithArgsParentheses:
Enabled: false
Style/SymbolArray:
EnforcedStyle: brackets
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex
Style/TopLevelMethodDefinition:
Enabled: true
Exclude:
- Taps/**/*
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/UnlessLogicalOperators:
Enabled: true
EnforcedStyle: forbid_logical_operators
Style/WordArray:
MinSize: 4