Class: Semgrep::Changes::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/semgrep/changes/checker.rb

Instance Method Summary collapse

Constructor Details

#initialize(report:, quiet:, commit:, base_branch:) ⇒ Checker

Returns a new instance of Checker.



14
15
16
17
18
19
# File 'lib/semgrep/changes/checker.rb', line 14

def initialize(report:, quiet:, commit:, base_branch:)
  @report = report
  @quiet = quiet
  @commit = commit
  @base_branch = base_branch
end

Instance Method Details

#runObject



21
22
23
24
25
26
27
# File 'lib/semgrep/changes/checker.rb', line 21

def run
  raise UnknownForkPointError if fork_point.empty?

  print_offenses! unless quiet

  total_offenses
end