diff --git a/.rubocop.yml b/.rubocop.yml index fb57e3f..6aeceb5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,95 +1,226 @@ -require: - - rubocop-performance - +--- AllCops: TargetRubyVersion: 3.3 NewCops: enable - + 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 - -Layout/EndAlignment: - EnforcedStyleAlignWith: start_of_line - 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 - -Metrics/AbcSize: - Max: 150 - -Metrics/BlockLength: - Max: 100 - -Metrics/ClassLength: - Max: 500 - -Metrics/CyclomaticComplexity: - Max: 30 - -Metrics/PerceivedComplexity: - Max: 30 - -Metrics/MethodLength: - Max: 100 - -Metrics/ParameterLists: - CountKeywordArgs: false - + 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/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: - Enabled: false - + 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 - 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 + diff --git a/Gemfile.lock b/Gemfile.lock index 51d0d39..9a5bf09 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) - racc (1.7.3) + racc (1.8.0) rack (3.0.11) rack-protection (4.0.0) base64 (>= 0.1.0) @@ -53,10 +53,10 @@ GEM rack (>= 3) webrick (~> 1.8) rainbow (3.1.1) - regexp_parser (2.9.1) + regexp_parser (2.9.2) rexml (3.2.8) strscan (>= 3.0.9) - rubocop (1.63.5) + rubocop (1.64.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -103,5 +103,8 @@ DEPENDENCIES rubocop-performance sinatra +RUBY VERSION + ruby 3.3.1p55 + BUNDLED WITH 2.5.9