Sha256: 4bd030b54f320299a23e9039a3decaaa780bf1d3ba9ab143aac08f84ed488efc

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

module Checker
  module Modules
    class Javascript < Base
      extensions 'js'
      private
      def check_one(file, opts = {})
        plain_command("jsl -process #{file}")
      end

      def check_for_executable
        silent_command('jsl -help:conf', :bundler => false)
      end

      def dependency_message
        str = "Executable not found\n"
        str << "Install jsl linter binary\n"
        str << "More info: http://www.javascriptlint.com/download.htm\n"
        str
      end

      # ignore exit status 1 - warnings
      def success?
        $? && ($?.exitstatus == 0 || $?.exitstatus == 1)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
checker-0.6.4 lib/checker/modules/javascript.rb
checker-0.6.3 lib/checker/modules/javascript.rb