Sha256: 6769abce41ba61c26e2f12da7a1ef52597178f8e840acdee1b873da16b7bc7b3

Contents?: true

Size: 825 Bytes

Versions: 1

Compression:

Stored size: 825 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift File.join(__dir__, %w(.. lib))

if ARGV.include?('--chefstyle')
  ARGV.delete('--chefstyle')
  require 'cookstyle/chefstyle'
else
  require 'cookstyle'
end

# force the fail level to :convention so that we can set all our new rules to
# the lowest level of :refactor without failing everyone's CI jobs
unless ARGV.include?('--fail-level')
  ARGV << '--fail-level'
  ARGV << 'C'
end

# we want to link to our docs
unless ARGV.include?('--display-style-guide')
  ARGV << '--display-style-guide'
end

# if only -v is passed we'll get 4 args (-v, --fail-level. --display-style-guide, and C)
if ARGV.size == 4 && %w(-v --version).include?(ARGV.first)
  puts "Cookstyle #{Cookstyle::VERSION}"
  print '  * RuboCop '
end

load Gem.bin_path('rubocop', 'rubocop')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cookstyle-7.32.8 bin/cookstyle