Sha256: d2512faa4d4f8dfd2480a5d2dd9750e2798974fdb1dbc7ce2bb92b873a9d9765

Contents?: true

Size: 670 Bytes

Versions: 109

Compression:

Stored size: 670 Bytes

Contents

module Standard
  module RakeSupport
    # Allow command line flags set in STANDARDOPTS (like MiniTest's TESTOPTS)
    def self.argvify
      if ENV["STANDARDOPTS"]
        ENV["STANDARDOPTS"].split(/\s+/)
      else
        []
      end
    end
  end
end

desc "Lint with the Standard Ruby style guide"
task :standard do
  require "standard"
  exit_code = Standard::Cli.new(Standard::RakeSupport.argvify).run
  fail unless exit_code == 0
end

desc "Lint and automatically fix with the Standard Ruby style guide"
task :"standard:fix" do
  require "standard"
  exit_code = Standard::Cli.new(Standard::RakeSupport.argvify + ["--fix"]).run
  fail unless exit_code == 0
end

Version data entries

109 entries across 109 versions & 3 rubygems

Version Path
standard-0.1.3 lib/standard/rake.rb
standard-0.1.2 lib/standard/rake.rb
standard-0.1.1 lib/standard/rake.rb
standard-0.1.0 lib/standard/rake.rb
standard-0.0.41 lib/standard/rake.rb
standard-0.0.40 lib/standard/rake.rb
standard-0.0.39 lib/standard/rake.rb
standard-0.0.38 lib/standard/rake.rb
standard-0.0.37 lib/standard/rake.rb