Class: Homebrew::DevCmd::StyleCmd Private

Inherits:
AbstractCommand show all
Defined in:
sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi,
dev-cmd/style.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

DO NOT EDIT MANUALLY This is an autogenerated file for dynamic methods in Homebrew::DevCmd::StyleCmd. Please instead update this file by running bin/tapioca dsl Homebrew::DevCmd::StyleCmd.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::StyleCmd::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



9
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 9

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'dev-cmd/style.rb', line 45

def run
  Homebrew.install_bundler_gems!(groups: ["style"])

  target = if args.no_named?
    nil
  else
    args.named.to_paths
  end

  only_cops = args.only_cops
  except_cops = args.except_cops

  options = {
    fix:         args.fix?,
    reset_cache: args.reset_cache?,
    debug:       args.debug?,
    verbose:     args.verbose?,
  }
  if only_cops
    options[:only_cops] = only_cops
  elsif except_cops
    options[:except_cops] = except_cops
  else
    options[:except_cops] = %w[FormulaAuditStrict]
  end

  Homebrew.failed = !Style.check_style_and_print(target, **options)
end