Skip to content

Commit 33fe421

Browse files
authored
Merge pull request #853 from Homebrew/sync-shared-config
Synchronize shared configuration
2 parents 750207f + 98b4f74 commit 33fe421

File tree

1 file changed

+219
-73
lines changed

1 file changed

+219
-73
lines changed

.rubocop.yml

+219-73
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,226 @@
1-
inherit_from:
2-
- ../.rubocop.yml
3-
4-
Bundler/GemFilename:
5-
Enabled: false
6-
7-
Homebrew/MoveToExtendOS:
1+
---
2+
AllCops:
3+
TargetRubyVersion: 3.3
4+
NewCops: enable
5+
Include:
6+
- "**/*.rbi"
7+
Exclude:
8+
- Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi
9+
- Homebrew/sorbet/rbi/parlour.rbi
10+
- Homebrew/bin/*
11+
- Homebrew/vendor/**/*
12+
- Taps/*/*/vendor/**/*
13+
SuggestExtensions:
14+
rubocop-minitest: false
15+
Homebrew:
816
Enabled: true
17+
Layout/ArgumentAlignment:
918
Exclude:
10-
- "{extend,test,requirements}/**/*"
11-
- "os.rb"
12-
13-
Naming/PredicateName:
19+
- Taps/*/*/*.rb
20+
- "/**/Formula/**/*.rb"
21+
- "**/Formula/**/*.rb"
22+
Layout/CaseIndentation:
23+
EnforcedStyle: end
24+
Layout/FirstArrayElementIndentation:
25+
EnforcedStyle: consistent
26+
Layout/FirstHashElementIndentation:
27+
EnforcedStyle: consistent
28+
Layout/EndAlignment:
29+
EnforcedStyleAlignWith: start_of_line
30+
Layout/HashAlignment:
31+
EnforcedHashRocketStyle: table
32+
EnforcedColonStyle: table
33+
Layout/LeadingCommentSpace:
34+
Exclude:
35+
- Taps/*/*/cmd/*.rb
36+
Layout/LineLength:
37+
Max: 118
38+
AllowedPatterns:
39+
- "#: "
40+
- ' url "'
41+
- ' mirror "'
42+
- " plist_options "
43+
- ' executable: "'
44+
- ' font "'
45+
- ' homepage "'
46+
- ' name "'
47+
- ' pkg "'
48+
- ' pkgutil: "'
49+
- " sha256 cellar: "
50+
- " sha256 "
51+
- "#{language}"
52+
- "#{version."
53+
- ' "/Library/Application Support/'
54+
- "\"/Library/Caches/"
55+
- "\"/Library/PreferencePanes/"
56+
- ' "~/Library/Application Support/'
57+
- "\"~/Library/Caches/"
58+
- "\"~/Library/Containers"
59+
- "\"~/Application Support"
60+
- " was verified as official when first introduced to the cask"
61+
Layout/SpaceAroundOperators:
62+
Enabled: false
63+
Layout/SpaceBeforeBrackets:
64+
Exclude:
65+
- "**/*_spec.rb"
66+
- Taps/*/*/*.rb
67+
- "/**/{Formula,Casks}/**/*.rb"
68+
- "**/{Formula,Casks}/**/*.rb"
69+
Lint/AmbiguousBlockAssociation:
70+
Enabled: false
71+
Lint/DuplicateBranch:
72+
Exclude:
73+
- Taps/*/*/*.rb
74+
- "/**/{Formula,Casks}/**/*.rb"
75+
- "**/{Formula,Casks}/**/*.rb"
76+
Lint/ParenthesesAsGroupedExpression:
77+
Exclude:
78+
- Taps/*/*/*.rb
79+
- "/**/Formula/**/*.rb"
80+
- "**/Formula/**/*.rb"
81+
Lint/UnusedMethodArgument:
82+
AllowUnusedKeywordArguments: true
83+
Metrics:
84+
Enabled: false
85+
Naming/BlockForwarding:
86+
Enabled: false
87+
Naming/FileName:
88+
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
89+
Naming/HeredocDelimiterNaming:
90+
ForbiddenDelimiters:
91+
- END, EOD, EOF
92+
Naming/InclusiveLanguage:
93+
CheckStrings: true
94+
FlaggedTerms:
95+
slave:
96+
AllowedRegex:
97+
- gitslave
98+
- log_slave
99+
- ssdb_slave
100+
- var_slave
101+
- patches/13_fix_scope_for_show_slave_status_data.patch
102+
Naming/MethodName:
103+
AllowedPatterns:
104+
- "\\A(fetch_)?HEAD\\?\\Z"
105+
Naming/MethodParameterName:
14106
inherit_mode:
15107
merge:
16-
- AllowedMethods
17-
AllowedMethods:
18-
- is_32_bit?
19-
- is_64_bit?
20-
21-
# Only enforce documentation for public APIs.
22-
# Checked by the tests.yml syntax job
23-
Style/Documentation:
24-
AllowedConstants:
25-
- Homebrew
108+
- AllowedNames
109+
Naming/VariableNumber:
110+
Enabled: false
111+
Style/AndOr:
112+
EnforcedStyle: always
113+
Style/ArgumentsForwarding:
114+
Enabled: false
115+
Style/AutoResourceCleanup:
116+
Enabled: true
117+
Style/BarePercentLiterals:
118+
EnforcedStyle: percent_q
119+
Style/BlockDelimiters:
120+
BracesRequiredMethods:
121+
- sig
122+
Style/ClassAndModuleChildren:
123+
Exclude:
124+
- "**/*.rbi"
125+
Style/CollectionMethods:
126+
Enabled: true
127+
Style/DisableCopsWithinSourceCodeDirective:
128+
Enabled: true
26129
Include:
27-
- cask/cask.rb
28-
- cask/dsl.rb
29-
- cask/dsl/version.rb
30-
- cask/url.rb
31-
- development_tools.rb
32-
- download_strategy.rb
33-
- extend/ENV/super.rb
34-
- extend/kernel.rb
35-
- extend/pathname.rb
36-
- formula.rb
37-
- formula_assertions.rb
38-
- formula_free_port.rb
39-
- language/go.rb
40-
- language/java.rb
41-
- language/node.rb
42-
- language/perl.rb
43-
- language/python.rb
44-
- livecheck/strategy/apache.rb
45-
- livecheck/strategy/bitbucket.rb
46-
- livecheck/strategy/cpan.rb
47-
- livecheck/strategy/crate.rb
48-
- livecheck/strategy/extract_plist.rb
49-
- livecheck/strategy/git.rb
50-
- livecheck/strategy/github_latest.rb
51-
- livecheck/strategy/github_releases.rb
52-
- livecheck/strategy/gnome.rb
53-
- livecheck/strategy/gnu.rb
54-
- livecheck/strategy/hackage.rb
55-
- livecheck/strategy/json.rb
56-
- livecheck/strategy/launchpad.rb
57-
- livecheck/strategy/npm.rb
58-
- livecheck/strategy/page_match.rb
59-
- livecheck/strategy/pypi.rb
60-
- livecheck/strategy/sourceforge.rb
61-
- livecheck/strategy/sparkle.rb
62-
- livecheck/strategy/xml.rb
63-
- livecheck/strategy/xorg.rb
64-
- livecheck/strategy/yaml.rb
65-
- os.rb
66-
- resource.rb
67-
- utils/inreplace.rb
68-
- utils/shebang.rb
69-
- utils/string_inreplace_extension.rb
70-
- version.rb
71-
- tap.rb
72-
73-
Homebrew/NegateInclude:
130+
- Taps/*/*/*.rb
131+
- "/**/{Formula,Casks}/**/*.rb"
132+
- "**/{Formula,Casks}/**/*.rb"
133+
Style/Documentation:
134+
Exclude:
135+
- Taps/**/*
136+
- "/**/{Formula,Casks}/**/*.rb"
137+
- "**/{Formula,Casks}/**/*.rb"
138+
- "**/*.rbi"
139+
Style/FetchEnvVar:
140+
Exclude:
141+
- Taps/*/*/*.rb
142+
- "/**/Formula/**/*.rb"
143+
- "**/Formula/**/*.rb"
144+
Style/FrozenStringLiteralComment:
145+
EnforcedStyle: always
146+
Exclude:
147+
- Taps/*/*/*.rb
148+
- "/**/{Formula,Casks}/**/*.rb"
149+
- "**/{Formula,Casks}/**/*.rb"
150+
- Homebrew/test/**/Casks/**/*.rb
151+
- "**/*.rbi"
152+
- "**/Brewfile"
153+
Style/GuardClause:
154+
Exclude:
155+
- Taps/*/*/*.rb
156+
- "/**/{Formula,Casks}/**/*.rb"
157+
- "**/{Formula,Casks}/**/*.rb"
158+
Style/HashAsLastArrayItem:
159+
Exclude:
160+
- Taps/*/*/*.rb
161+
- "/**/Formula/**/*.rb"
162+
- "**/Formula/**/*.rb"
163+
Style/InverseMethods:
164+
InverseMethods:
165+
:blank?: :present?
166+
Style/InvertibleUnlessCondition:
167+
Enabled: true
168+
InverseMethods:
169+
:==: :!=
170+
:zero?:
171+
:blank?: :present?
172+
Style/MutableConstant:
173+
EnforcedStyle: strict
174+
Style/NumericLiteralPrefix:
175+
EnforcedOctalStyle: zero_only
176+
Style/NumericLiterals:
177+
MinDigits: 7
178+
Strict: true
179+
Exclude:
180+
- "**/Brewfile"
181+
Style/OpenStructUse:
74182
Exclude:
75-
# YARD runs stand-alone.
76-
- yard/docstring_parser.rb
183+
- Taps/**/*
184+
- Homebrew/cli/args.rb
185+
- Homebrew/cli/args.rbi
186+
Style/RescueStandardError:
187+
EnforcedStyle: implicit
188+
Style/ReturnNil:
189+
Enabled: true
190+
Style/SendWithLiteralMethodName:
191+
Enabled: false
192+
Style/StderrPuts:
193+
Enabled: false
194+
Style/StringConcatenation:
195+
Exclude:
196+
- Taps/*/*/*.rb
197+
- "/**/{Formula,Casks}/**/*.rb"
198+
- "**/{Formula,Casks}/**/*.rb"
199+
Style/StringLiterals:
200+
EnforcedStyle: double_quotes
201+
Style/StringLiteralsInInterpolation:
202+
EnforcedStyle: double_quotes
203+
Style/StringMethods:
204+
Enabled: true
205+
Style/SuperWithArgsParentheses:
206+
Enabled: false
207+
Style/SymbolArray:
208+
EnforcedStyle: brackets
209+
Style/TernaryParentheses:
210+
EnforcedStyle: require_parentheses_when_complex
211+
Style/TopLevelMethodDefinition:
212+
Enabled: true
213+
Exclude:
214+
- Taps/**/*
215+
Style/TrailingCommaInArguments:
216+
EnforcedStyleForMultiline: comma
217+
Style/TrailingCommaInArrayLiteral:
218+
EnforcedStyleForMultiline: comma
219+
Style/TrailingCommaInHashLiteral:
220+
EnforcedStyleForMultiline: comma
221+
Style/UnlessLogicalOperators:
222+
Enabled: true
223+
EnforcedStyle: forbid_logical_operators
224+
Style/WordArray:
225+
MinSize: 4
77226

78-
Style/DocumentationMethod:
79-
Include:
80-
- "formula.rb"

0 commit comments

Comments
 (0)