Sha256: 76c5a516f3adef49ea650768b13fcdf70e02dc942d4083b857d869aea7d77232

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

desc "lint application javascript"
task :coffeelint do
  success = true
  Coffeelint.lint_dir('.') do |name, errors|
    name = name[2..-1]

    good = "\u2713"
    bad = "\u2717"

    if errors.length == 0
      puts "  #{good} \e[1m\e[32m#{name}\e[0m"
    else
      success = false
      puts "  #{bad} \e[1m\e[31m#{name}\e[0m"
      errors.each do |error|
        puts "     #{bad} \e[31m##{error["lineNumber"]}\e[0m: #{error["message"]}, #{error["context"]}."
      end
    end
  end

  fail "Lint!" unless success
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coffeelint-0.0.1 lib/tasks/coffeelint.rake