Module: Cookstyle

Defined in:
lib/cookstyle.rb,
lib/cookstyle/version.rb,
lib/cookstyle/chefstyle.rb

Overview

Cookstyle patches the RuboCop tool to set a new default configuration that is vendored in the Cookstyle codebase.

Constant Summary collapse

VERSION =

rubocop: disable Style/StringLiterals

"8.6.4"
RUBOCOP_VERSION =
'1.84.2'
CHEFSTYLE_CONFIG =
true

Class Method Summary collapse

Class Method Details

.configString

Returns the absolute path to the main RuboCop configuration YAML file.

Returns:

  • (String)

    the absolute path to the main RuboCop configuration YAML file



22
23
24
25
# File 'lib/cookstyle.rb', line 22

def self.config
  config_file = const_defined?(:CHEFSTYLE_CONFIG) ? 'chefstyle.yml' : 'default.yml'
  File.realpath(File.join(__dir__, '..', 'config', config_file))
end