Class: RakeCheck::Checker::CoffeeLint

Inherits:
Base
  • Object
show all
Defined in:
lib/rake_check/checker/coffee_lint.rb

Overview

CoffeeLint Checker looks for smells in your Coffeescript code

Instance Attribute Summary

Attributes inherited from Base

#check_output, #options, #time

Instance Method Summary collapse

Methods inherited from Base

#initialize, #status, #success?, #type

Constructor Details

This class inherits a constructor from RakeCheck::Checker::Base

Instance Method Details

#config_fileObject



16
17
18
19
# File 'lib/rake_check/checker/coffee_lint.rb', line 16

def config_file
  default = "clint_config.json"
  File.exists?(default) ? "--file #{default}" : nil
end

#runObject



7
8
9
# File 'lib/rake_check/checker/coffee_lint.rb', line 7

def run
  run_command "coffeelint -r #{config_file.to_s} --color --quiet ."
end

#short_messageObject



11
12
13
14
# File 'lib/rake_check/checker/coffee_lint.rb', line 11

def short_message
  @short_message ||= "with " +
    check_output[/\d+ errors and \d+ warnings in \d+ files?/, 0].to_s
end