Class: Pronto::AndroidLintRunner

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

Instance Method Summary collapse

Instance Method Details

#runObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/pronto/android_lint_runner.rb', line 6

def run
  paths = ENV["PRONTO_ANDROID_LINT_RESULT_PATHS"]
  return [] unless @patches && paths

  offences = paths.split(",")
    .map{ |path| AndroidLint::OutputParser.new(path).parse }
    .flatten
    .compact

  @patches.select { |p| p.additions > 0 }
    .map { |p| inspect(p, offences) }
    .flatten
    .compact
end