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-1.25.5 lib/standard/rake.rb
standard-1.25.4 lib/standard/rake.rb
standard-1.25.3 lib/standard/rake.rb
standard-1.25.2 lib/standard/rake.rb
standard-1.25.1 lib/standard/rake.rb
standard-1.25.0 lib/standard/rake.rb
standard-1.24.3 lib/standard/rake.rb
standard-1.24.2 lib/standard/rake.rb
standard-1.24.1 lib/standard/rake.rb
standard-1.24.0 lib/standard/rake.rb
standard-1.23.0 lib/standard/rake.rb
standard-1.22.1 lib/standard/rake.rb
standard-1.22.0 lib/standard/rake.rb
standard-1.21.1 lib/standard/rake.rb
standard-1.21.0 lib/standard/rake.rb
standard-1.20.0 lib/standard/rake.rb
standard-1.19.1 lib/standard/rake.rb
standard-1.19.0 lib/standard/rake.rb
standard-1.18.1 lib/standard/rake.rb
standard-1.18.0 lib/standard/rake.rb