Skip to content

Commit

Permalink
Merge pull request #969 from dafyddcrosby/chefstyle_rake
Browse files Browse the repository at this point in the history
Add chefstyle library file for Rake backwards compatibility
  • Loading branch information
tpowell-progress committed Feb 6, 2024
2 parents ace8dd0 + 9a97f54 commit ee47540
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bin/cookstyle
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

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

if ARGV.include?('--chefstyle')
ARGV.delete('--chefstyle')
module Cookstyle
CHEFSTYLE_CONFIG = true
end
require 'cookstyle/chefstyle'
else
require 'cookstyle'
end

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

require 'cookstyle'

# 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')
Expand Down
5 changes: 5 additions & 0 deletions lib/cookstyle/chefstyle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true
module Cookstyle
CHEFSTYLE_CONFIG = true
end
require_relative '../cookstyle'

0 comments on commit ee47540

Please sign in to comment.