Skip to content

Commit

Permalink
Merge pull request #971 from dafyddcrosby/fix_970
Browse files Browse the repository at this point in the history
Fix #970: Add extra stub to pass ConfigValidator
  • Loading branch information
tpowell-progress committed Jun 18, 2024
2 parents dbbc1b8 + 6dfefd6 commit 288b55d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/cookstyle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def self.config
require_relative file # not actually relative but require_relative is faster
end

# stub default value of TargetChefVersion to avoid STDERR noise
RuboCop::ConfigLoader.default_configuration['AllCops']['TargetChefVersion'] = '~'
# stub default value of TargetChefVersion to avoid STDERR noise when ConfigLoader.configuration_from_file runs
RuboCop::ConfigLoader.default_configuration['AllCops']['TargetChefVersion'] ||= nil

RuboCop::ConfigLoader.default_configuration = RuboCop::ConfigLoader.configuration_from_file(Cookstyle.config)

# re-stub TargetChefVersion to avoid STDERR noise on *next* configuration load
RuboCop::ConfigLoader.default_configuration['AllCops']['TargetChefVersion'] ||= nil

0 comments on commit 288b55d

Please sign in to comment.