Skip to content

Commit d71bb64

Browse files
committed
.rubocop.yml: update to match main configuration
1 parent 583fcf2 commit d71bb64

File tree

1 file changed

+232
-0
lines changed

1 file changed

+232
-0
lines changed

.rubocop.yml

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# This file is synced from `Homebrew/brew` by the `.github` repository, do not modify it directly.
2+
---
3+
AllCops:
4+
ParserEngine: parser_prism
5+
TargetRubyVersion: 3.3
6+
NewCops: enable
7+
Include:
8+
- "**/*.rbi"
9+
Exclude:
10+
- Homebrew/sorbet/rbi/{annotations,dsl,gems}/**/*.rbi
11+
- Homebrew/sorbet/rbi/parser*.rbi
12+
- Homebrew/bin/*
13+
- Homebrew/vendor/**/*
14+
- Taps/*/*/vendor/**/*
15+
- "**/vendor/**/*"
16+
SuggestExtensions:
17+
rubocop-minitest: false
18+
Layout/ArgumentAlignment:
19+
Exclude:
20+
- Taps/*/*/*.rb
21+
- "/**/Formula/**/*.rb"
22+
- "**/Formula/**/*.rb"
23+
Layout/CaseIndentation:
24+
EnforcedStyle: end
25+
Layout/FirstArrayElementIndentation:
26+
EnforcedStyle: consistent
27+
Layout/FirstHashElementIndentation:
28+
EnforcedStyle: consistent
29+
Layout/EndAlignment:
30+
EnforcedStyleAlignWith: start_of_line
31+
Layout/HashAlignment:
32+
EnforcedHashRocketStyle: table
33+
EnforcedColonStyle: table
34+
Layout/LeadingCommentSpace:
35+
Exclude:
36+
- Taps/*/*/cmd/*.rb
37+
Layout/LineLength:
38+
Max: 118
39+
AllowedPatterns:
40+
- "#: "
41+
- ' url "'
42+
- ' mirror "'
43+
- " plist_options "
44+
- ' executable: "'
45+
- ' font "'
46+
- ' homepage "'
47+
- ' name "'
48+
- ' pkg "'
49+
- ' pkgutil: "'
50+
- " sha256 cellar: "
51+
- " sha256 "
52+
- "#{language}"
53+
- "#{version."
54+
- ' "/Library/Application Support/'
55+
- "\"/Library/Caches/"
56+
- "\"/Library/PreferencePanes/"
57+
- ' "~/Library/Application Support/'
58+
- "\"~/Library/Caches/"
59+
- "\"~/Library/Containers"
60+
- "\"~/Application Support"
61+
- " was verified as official when first introduced to the cask"
62+
Layout/SpaceAroundOperators:
63+
Enabled: false
64+
Layout/SpaceBeforeBrackets:
65+
Exclude:
66+
- "**/*_spec.rb"
67+
- Taps/*/*/*.rb
68+
- "/**/{Formula,Casks}/**/*.rb"
69+
- "**/{Formula,Casks}/**/*.rb"
70+
Lint/AmbiguousBlockAssociation:
71+
Enabled: false
72+
Lint/DuplicateBranch:
73+
Exclude:
74+
- Taps/*/*/*.rb
75+
- "/**/{Formula,Casks}/**/*.rb"
76+
- "**/{Formula,Casks}/**/*.rb"
77+
Lint/ParenthesesAsGroupedExpression:
78+
Exclude:
79+
- Taps/*/*/*.rb
80+
- "/**/Formula/**/*.rb"
81+
- "**/Formula/**/*.rb"
82+
Lint/UnusedMethodArgument:
83+
AllowUnusedKeywordArguments: true
84+
Metrics:
85+
Enabled: false
86+
Naming/BlockForwarding:
87+
Enabled: false
88+
Naming/FileName:
89+
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
90+
Naming/HeredocDelimiterNaming:
91+
ForbiddenDelimiters:
92+
- END, EOD, EOF
93+
Naming/InclusiveLanguage:
94+
CheckStrings: true
95+
FlaggedTerms:
96+
slave:
97+
AllowedRegex:
98+
- gitslave
99+
- log_slave
100+
- ssdb_slave
101+
- var_slave
102+
- patches/13_fix_scope_for_show_slave_status_data.patch
103+
Naming/MethodName:
104+
AllowedPatterns:
105+
- "\\A(fetch_)?HEAD\\?\\Z"
106+
Naming/MethodParameterName:
107+
inherit_mode:
108+
merge:
109+
- AllowedNames
110+
Naming/PredicateMethod:
111+
AllowBangMethods: true
112+
Naming/VariableNumber:
113+
Enabled: false
114+
Style/AndOr:
115+
EnforcedStyle: always
116+
Style/ArgumentsForwarding:
117+
Enabled: false
118+
Style/AutoResourceCleanup:
119+
Enabled: true
120+
Style/BarePercentLiterals:
121+
EnforcedStyle: percent_q
122+
Style/BlockDelimiters:
123+
BracesRequiredMethods:
124+
- sig
125+
Style/ClassAndModuleChildren:
126+
Exclude:
127+
- "**/*.rbi"
128+
Style/CollectionMethods:
129+
Enabled: true
130+
Style/DisableCopsWithinSourceCodeDirective:
131+
Enabled: true
132+
Include:
133+
- Taps/*/*/*.rb
134+
- "/**/{Formula,Casks}/**/*.rb"
135+
- "**/{Formula,Casks}/**/*.rb"
136+
Style/Documentation:
137+
Exclude:
138+
- Taps/**/*
139+
- "/**/{Formula,Casks}/**/*.rb"
140+
- "**/{Formula,Casks}/**/*.rb"
141+
- "**/*.rbi"
142+
Style/EmptyMethod:
143+
Exclude:
144+
- "**/*.rbi"
145+
Style/FetchEnvVar:
146+
Exclude:
147+
- Taps/*/*/*.rb
148+
- "/**/Formula/**/*.rb"
149+
- "**/Formula/**/*.rb"
150+
Style/FrozenStringLiteralComment:
151+
EnforcedStyle: always
152+
Exclude:
153+
- Taps/*/*/*.rb
154+
- "/**/{Formula,Casks}/**/*.rb"
155+
- "**/{Formula,Casks}/**/*.rb"
156+
- Homebrew/test/**/Casks/**/*.rb
157+
- "**/*.rbi"
158+
- "**/Brewfile"
159+
Style/GuardClause:
160+
Exclude:
161+
- Taps/*/*/*.rb
162+
- "/**/{Formula,Casks}/**/*.rb"
163+
- "**/{Formula,Casks}/**/*.rb"
164+
Style/HashAsLastArrayItem:
165+
Exclude:
166+
- Taps/*/*/*.rb
167+
- "/**/Formula/**/*.rb"
168+
- "**/Formula/**/*.rb"
169+
Style/InverseMethods:
170+
InverseMethods:
171+
:blank?: :present?
172+
Style/InvertibleUnlessCondition:
173+
Enabled: true
174+
InverseMethods:
175+
:==: :!=
176+
:zero?:
177+
:blank?: :present?
178+
Style/MutableConstant:
179+
EnforcedStyle: strict
180+
Style/NumericLiteralPrefix:
181+
EnforcedOctalStyle: zero_only
182+
Style/NumericLiterals:
183+
MinDigits: 11
184+
Strict: true
185+
Style/OpenStructUse:
186+
Exclude:
187+
- Taps/**/*
188+
Style/OptionalBooleanParameter:
189+
AllowedMethods:
190+
- respond_to?
191+
- respond_to_missing?
192+
Style/RedundantLineContinuation:
193+
Enabled: false
194+
Style/RescueStandardError:
195+
EnforcedStyle: implicit
196+
Style/ReturnNil:
197+
Enabled: true
198+
Style/StderrPuts:
199+
Enabled: false
200+
Style/StringConcatenation:
201+
Exclude:
202+
- Taps/*/*/*.rb
203+
- "/**/{Formula,Casks}/**/*.rb"
204+
- "**/{Formula,Casks}/**/*.rb"
205+
Style/StringLiterals:
206+
EnforcedStyle: double_quotes
207+
Style/StringLiteralsInInterpolation:
208+
EnforcedStyle: double_quotes
209+
Style/StringMethods:
210+
Enabled: true
211+
Style/SuperWithArgsParentheses:
212+
Enabled: false
213+
Style/SymbolArray:
214+
EnforcedStyle: brackets
215+
Style/TernaryParentheses:
216+
EnforcedStyle: require_parentheses_when_complex
217+
Style/TopLevelMethodDefinition:
218+
Enabled: true
219+
Exclude:
220+
- Taps/**/*
221+
Style/TrailingCommaInArguments:
222+
EnforcedStyleForMultiline: comma
223+
Style/TrailingCommaInArrayLiteral:
224+
EnforcedStyleForMultiline: comma
225+
Style/TrailingCommaInHashLiteral:
226+
EnforcedStyleForMultiline: comma
227+
Style/UnlessLogicalOperators:
228+
Enabled: true
229+
EnforcedStyle: forbid_logical_operators
230+
Style/WordArray:
231+
MinSize: 4
232+

0 commit comments

Comments
 (0)