Sha256: 1c127ecb81c7fb9d032f3a21368b61d39d781cfd9ed454b5f66f51f8c77ea74c
Contents?: true
Size: 980 Bytes
Versions: 1
Compression:
Stored size: 980 Bytes
Contents
# frozen_string_literal: true require_relative "chefstyle/version" # ensure the desired target version of RuboCop is gem activated gem "rubocop", "= #{Chefstyle::RUBOCOP_VERSION}" require "rubocop" module RuboCop class ConfigLoader RUBOCOP_HOME.gsub!( /^.*$/, File.realpath(File.join(File.dirname(__FILE__), "..")) ) DEFAULT_FILE.gsub!( /^.*$/, File.join(RUBOCOP_HOME, "config", "default.yml") ) end end # Chefstyle patches the RuboCop tool to set a new default configuration that # is vendored in the Chefstyle codebase. module Chefstyle # @return [String] the absolute path to the main RuboCop configuration YAML file def self.config RuboCop::ConfigLoader::DEFAULT_FILE end end require_relative "rubocop/chef" # Chef custom cops Dir.glob(File.dirname(__FILE__) + "/rubocop/cop/chef/**/*.rb") do |file| next if File.directory?(file) require_relative file # not actually relative but require_relative is faster end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chefstyle-1.3.2 | lib/chefstyle.rb |