Class: Pronto::CredoRunner

Inherits:
Runner
  • Object
show all
Defined in:
lib/pronto/credo_runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(_, _) ⇒ CredoRunner

Returns a new instance of CredoRunner.



6
7
8
# File 'lib/pronto/credo_runner.rb', line 6

def initialize(_, _)
  super
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pronto/credo_runner.rb', line 10

def run
  return [] unless @patches

  compile if ENV["PRONTO_CREDO_COMPILE"] == 1

  @patches.select { |p| p.additions > 0 }
    .select { |p| elixir_file?(p.new_file_full_path) }
    .map { |p| inspect(p) }
    .flatten
    .compact
end