Sha256: 838af42273efc9aa085607f3063969d34a6d6e802ff2885bc77108e0e137aa67

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

require_relative 'base'

module LintTrap
  module Linter
    # Encapsulates logic specific to checkstyle command line tool.
    class CheckStyle < Base
      JAR = 'checkstyle/checkstyle_logger-all.jar'
      CHECKS_XML = 'checkstyle/sun_checks.xml'

      def languages
        super(Language::Java)
      end

    private

      def command_name
        'java'
      end

      def flags
        [
          '-jar', config_path(JAR),
          '-c', options[:config] || config_path(CHECKS_XML)
        ]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lint_trap-0.0.11 lib/lint_trap/linter/checkstyle.rb
lint_trap-0.0.10 lib/lint_trap/linter/checkstyle.rb
lint_trap-0.0.9 lib/lint_trap/linter/checkstyle.rb