Class: PmdTranslateCheckstyleFormat::CLI

Inherits:
Thor
  • Object
show all
Includes:
Translate
Defined in:
lib/pmd_translate_checkstyle_format/cli.rb

Instance Method Summary collapse

Methods included from Translate

#create_cpd_message, #get_severity, #parse, #set_dummy, #trans, #trans_cpd

Instance Method Details

#translateObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/pmd_translate_checkstyle_format/cli.rb', line 10

def translate
  data = fetch_data(options)
  xml = parse(data)
  if options['cpd-translate']
    checkstyle = trans_cpd(xml)
  elsif
    checkstyle = trans(xml)
  end
  checkstyle.write(STDOUT, 2)
end