Class: Codacy::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/codacy/formatter.rb

Instance Method Summary collapse

Instance Method Details

#format(result) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/codacy/formatter.rb', line 4

def format(result)
  if should_run?
    parse_result = Codacy::Parser.parse_file(result)
    Codacy::ClientAPI.post_results(parse_result)
  else
    logger.info("Running locally, skipping Codacy coverage")
  end
rescue => ex
  logger.fatal(ex)
  false
end