Sha256: d2138408f7ee747e17728857f8f9f908974fd087868a95716582df83357c3e16

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

module Phare
  class Check
    attr_reader :status

    def initialize(directory)
      @directory = directory
      @directory << '/' unless @directory.end_with?('/')
    end

    def run
      ruby = Checks::RubyRubocop.new
      ruby.run

      jshint = Checks::JavaScriptJSHint.new(@directory)
      jshint.run

      jscs = Checks::JavaScriptJSCS.new(@directory)
      jscs.run

      @status = [ruby.status, jshint.status, jscs.status].find { |status| status > 0 } || 0
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phare-0.1.2 lib/phare/check.rb
phare-0.1.1 lib/phare/check.rb