Skip to content

Commit

Permalink
Resolve Cookstyle warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Dec 31, 2021
1 parent 0bf5ef2 commit 0070bed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ task :vendor do
require 'rubocop'
require 'yaml' unless defined?(YAML)
cfg = RuboCop::Cop::Cop.all.each_with_object({}) { |cop, acc| acc[cop.cop_name] = { 'Enabled' => false } unless cop.cop_name.start_with?('Chef'); }
File.open(dst.join('disable_all.yml'), 'w') { |fh| fh.write YAML.dump(cfg) }
File.write(dst.join('disable_all.yml'), YAML.dump(cfg))

sh %(git add #{dst}/{upstream,disable_all}.yml)
sh %(git commit -m "Vendor rubocop-#{upstream.version} upstream configuration." -m "Obvious fix; these changes are the result of automation not creative thinking.")
Expand Down
2 changes: 1 addition & 1 deletion tasks/cops_documentation.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ begin
end

contents = File.read('README.md').gsub(/ship \*\*\d* Chef/, "ship **#{cop_count} Chef")
File.open('README.md', 'w') { |file| file.write(contents) }
File.write('README.md', contents)
end

desc 'Generate yaml format docs of all Chef/InSpec cops for docs.chef.io'
Expand Down

0 comments on commit 0070bed

Please sign in to comment.