-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.rubocop.yml: update to match main configuration
- Loading branch information
1 parent
4309377
commit 82b802d
Showing
1 changed file
with
210 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,226 @@ | ||
--- | ||
AllCops: | ||
TargetRubyVersion: 2.6 | ||
TargetRubyVersion: 3.3 | ||
NewCops: enable | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StringLiteralsInInterpolation: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/TrailingCommaInArrayLiteral: | ||
EnforcedStyleForMultiline: comma | ||
|
||
Style/TrailingCommaInHashLiteral: | ||
EnforcedStyleForMultiline: comma | ||
|
||
Style/FormatString: | ||
EnforcedStyle: percent | ||
|
||
# we prefer compact if-else-end/case-when-end alignment | ||
Layout/EndAlignment: | ||
EnforcedStyleAlignWith: variable | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
|
||
Style/TrailingCommaInArguments: | ||
EnforcedStyleForMultiline: no_comma | ||
|
||
Include: | ||
- "**/*.rbi" | ||
Exclude: | ||
- Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi | ||
- Homebrew/sorbet/rbi/parlour.rbi | ||
- Homebrew/bin/* | ||
- Homebrew/vendor/**/* | ||
- Taps/*/*/vendor/**/* | ||
SuggestExtensions: | ||
rubocop-minitest: false | ||
Homebrew: | ||
Enabled: true | ||
Layout/ArgumentAlignment: | ||
Exclude: | ||
- Taps/*/*/*.rb | ||
- "/**/Formula/**/*.rb" | ||
- "**/Formula/**/*.rb" | ||
Layout/CaseIndentation: | ||
EnforcedStyle: end | ||
|
||
# TODO: re-enable in the future | ||
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 | ||
|
||
Metrics/AbcSize: | ||
Layout/SpaceBeforeBrackets: | ||
Exclude: | ||
- "**/*_spec.rb" | ||
- Taps/*/*/*.rb | ||
- "/**/{Formula,Casks}/**/*.rb" | ||
- "**/{Formula,Casks}/**/*.rb" | ||
Lint/AmbiguousBlockAssociation: | ||
Enabled: false | ||
|
||
Metrics/ClassLength: | ||
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 | ||
|
||
Metrics/CyclomaticComplexity: | ||
Naming/BlockForwarding: | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/ModuleLength: | ||
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 | ||
|
||
Metrics/ParameterLists: | ||
Style/AndOr: | ||
EnforcedStyle: always | ||
Style/ArgumentsForwarding: | ||
Enabled: false | ||
|
||
Metrics/PerceivedComplexity: | ||
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/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/RescueStandardError: | ||
EnforcedStyle: implicit | ||
Style/ReturnNil: | ||
Enabled: true | ||
Style/SendWithLiteralMethodName: | ||
Enabled: false | ||
|
||
Naming/MethodParameterName: | ||
Style/StderrPuts: | ||
Enabled: false | ||
|
||
Naming/VariableNumber: | ||
CheckSymbols: false | ||
Style/StringConcatenation: | ||
Exclude: | ||
- 'test/**' | ||
|
||
Metrics/BlockLength: | ||
- 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: | ||
- 'test/**' | ||
- 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 | ||
|