Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / .rubocop.yml
blob646abda13416953d16927fc8bdc56f93e4cae42c
1 # This file is synced from `Homebrew/brew` by the `.github` repository, do not modify it directly.
2 ---
3 AllCops:
4   TargetRubyVersion: 3.3
5   NewCops: enable
6   Include:
7   - "**/*.rbi"
8   Exclude:
9   - Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi
10   - Homebrew/bin/*
11   - Homebrew/vendor/**/*
12   - Taps/*/*/vendor/**/*
13   - "**/vendor/**/*"
14   SuggestExtensions:
15     rubocop-minitest: false
16 Layout/ArgumentAlignment:
17   Exclude:
18   - Taps/*/*/*.rb
19   - "/**/Formula/**/*.rb"
20   - "**/Formula/**/*.rb"
21 Layout/CaseIndentation:
22   EnforcedStyle: end
23 Layout/FirstArrayElementIndentation:
24   EnforcedStyle: consistent
25 Layout/FirstHashElementIndentation:
26   EnforcedStyle: consistent
27 Layout/EndAlignment:
28   EnforcedStyleAlignWith: start_of_line
29 Layout/HashAlignment:
30   EnforcedHashRocketStyle: table
31   EnforcedColonStyle: table
32 Layout/LeadingCommentSpace:
33   Exclude:
34   - Taps/*/*/cmd/*.rb
35 Layout/LineLength:
36   Max: 118
37   AllowedPatterns:
38   - "#: "
39   - ' url "'
40   - ' mirror "'
41   - " plist_options "
42   - ' executable: "'
43   - ' font "'
44   - ' homepage "'
45   - ' name "'
46   - ' pkg "'
47   - ' pkgutil: "'
48   - "    sha256 cellar: "
49   - "    sha256  "
50   - "#{language}"
51   - "#{version."
52   - ' "/Library/Application Support/'
53   - "\"/Library/Caches/"
54   - "\"/Library/PreferencePanes/"
55   - ' "~/Library/Application Support/'
56   - "\"~/Library/Caches/"
57   - "\"~/Library/Containers"
58   - "\"~/Application Support"
59   - " was verified as official when first introduced to the cask"
60 Layout/SpaceAroundOperators:
61   Enabled: false
62 Layout/SpaceBeforeBrackets:
63   Exclude:
64   - "**/*_spec.rb"
65   - Taps/*/*/*.rb
66   - "/**/{Formula,Casks}/**/*.rb"
67   - "**/{Formula,Casks}/**/*.rb"
68 Lint/AmbiguousBlockAssociation:
69   Enabled: false
70 Lint/DuplicateBranch:
71   Exclude:
72   - Taps/*/*/*.rb
73   - "/**/{Formula,Casks}/**/*.rb"
74   - "**/{Formula,Casks}/**/*.rb"
75 Lint/ParenthesesAsGroupedExpression:
76   Exclude:
77   - Taps/*/*/*.rb
78   - "/**/Formula/**/*.rb"
79   - "**/Formula/**/*.rb"
80 Lint/UnusedMethodArgument:
81   AllowUnusedKeywordArguments: true
82 Metrics:
83   Enabled: false
84 Naming/BlockForwarding:
85   Enabled: false
86 Naming/FileName:
87   Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
88 Naming/HeredocDelimiterNaming:
89   ForbiddenDelimiters:
90   - END, EOD, EOF
91 Naming/InclusiveLanguage:
92   CheckStrings: true
93   FlaggedTerms:
94     slave:
95       AllowedRegex:
96       - gitslave
97       - log_slave
98       - ssdb_slave
99       - var_slave
100       - patches/13_fix_scope_for_show_slave_status_data.patch
101 Naming/MethodName:
102   AllowedPatterns:
103   - "\\A(fetch_)?HEAD\\?\\Z"
104 Naming/MethodParameterName:
105   inherit_mode:
106     merge:
107     - AllowedNames
108 Naming/VariableNumber:
109   Enabled: false
110 Style/AndOr:
111   EnforcedStyle: always
112 Style/ArgumentsForwarding:
113   Enabled: false
114 Style/AutoResourceCleanup:
115   Enabled: true
116 Style/BarePercentLiterals:
117   EnforcedStyle: percent_q
118 Style/BlockDelimiters:
119   BracesRequiredMethods:
120   - sig
121 Style/ClassAndModuleChildren:
122   Exclude:
123   - "**/*.rbi"
124 Style/CollectionMethods:
125   Enabled: true
126 Style/DisableCopsWithinSourceCodeDirective:
127   Enabled: true
128   Include:
129   - Taps/*/*/*.rb
130   - "/**/{Formula,Casks}/**/*.rb"
131   - "**/{Formula,Casks}/**/*.rb"
132 Style/Documentation:
133   Exclude:
134   - Taps/**/*
135   - "/**/{Formula,Casks}/**/*.rb"
136   - "**/{Formula,Casks}/**/*.rb"
137   - "**/*.rbi"
138 Style/EmptyMethod:
139   Exclude:
140   - "**/*.rbi"
141 Style/FetchEnvVar:
142   Exclude:
143   - Taps/*/*/*.rb
144   - "/**/Formula/**/*.rb"
145   - "**/Formula/**/*.rb"
146 Style/FrozenStringLiteralComment:
147   EnforcedStyle: always
148   Exclude:
149   - Taps/*/*/*.rb
150   - "/**/{Formula,Casks}/**/*.rb"
151   - "**/{Formula,Casks}/**/*.rb"
152   - Homebrew/test/**/Casks/**/*.rb
153   - "**/*.rbi"
154   - "**/Brewfile"
155 Style/GuardClause:
156   Exclude:
157   - Taps/*/*/*.rb
158   - "/**/{Formula,Casks}/**/*.rb"
159   - "**/{Formula,Casks}/**/*.rb"
160 Style/HashAsLastArrayItem:
161   Exclude:
162   - Taps/*/*/*.rb
163   - "/**/Formula/**/*.rb"
164   - "**/Formula/**/*.rb"
165 Style/InverseMethods:
166   InverseMethods:
167     :blank?: :present?
168 Style/InvertibleUnlessCondition:
169   Enabled: true
170   InverseMethods:
171     :==: :!=
172     :zero?: 
173     :blank?: :present?
174 Style/MutableConstant:
175   EnforcedStyle: strict
176 Style/NumericLiteralPrefix:
177   EnforcedOctalStyle: zero_only
178 Style/NumericLiterals:
179   MinDigits: 7
180   Strict: true
181   Exclude:
182   - "**/Brewfile"
183 Style/OpenStructUse:
184   Exclude:
185   - Taps/**/*
186   - Homebrew/cli/args.rb
187   - Homebrew/cli/args.rbi
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