Sha256: e03b38ad241eb2177fab59152f6e90bec358bc050a11543bdb3b072e7dbcb6cf

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 Bytes

Contents

module Phare
  module Checks
    class RubyRubocop
      attr_reader :status

      def initialize
        @command = 'bundle exec rubocop'

        puts '----------------------------------------'
        puts 'Running Rubocop to check for Ruby style…'
        puts '----------------------------------------'
      end

      def run
        system(@command)
        @status = $CHILD_STATUS.exitstatus

        unless @status == 0
          puts "Something went wrong. Program exited with #{@status}"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phare-0.1 lib/phare/checks/ruby_rubocop.rb