Class: Rubocop::Changes::Checker
- Inherits:
-
Object
- Object
- Rubocop::Changes::Checker
- Defined in:
- lib/rubocop/changes/checker.rb
Instance Method Summary collapse
-
#initialize(format:, quiet:, commit:, auto_correct:, base_branch:) ⇒ Checker
constructor
A new instance of Checker.
- #run ⇒ Object
Constructor Details
#initialize(format:, quiet:, commit:, auto_correct:, base_branch:) ⇒ Checker
Returns a new instance of Checker.
17 18 19 20 21 22 23 |
# File 'lib/rubocop/changes/checker.rb', line 17 def initialize(format:, quiet:, commit:, auto_correct:, base_branch:) @format = format @quiet = quiet @commit = commit @auto_correct = auto_correct @base_branch = base_branch end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/rubocop/changes/checker.rb', line 25 def run raise UnknownBaseBranchError if base_branch.empty? raise UnknownForkPointError if fork_point.empty? raise UnknownFormat if formatter_klass.nil? print_offenses! unless quiet checks.map(&:offenses).flatten end |