Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,3 @@ steps:
docker:
image: ruby:3.1

- label: chefstyle-tests-ruby-3.1
command:
- .expeditor/run_linux_tests.sh "rake style:chefstyle"
expeditor:
executor:
docker:
image: ruby:3.1
14 changes: 7 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
require:
- chefstyle

AllCops:
TargetRubyVersion: 3.1
Include:
- "**/*.rb"
- "**/*.rb"
Exclude:
- "vendor/**/*"
- "spec/**/*"
- "vendor/**/*"
- "spec/**/*"

Style/StringLiterals:
Exclude:
- "spec/unit/fixtures/**/*"
- "lib/chef-cli/skeletons/**/*"

Layout/TrailingWhitespace:
Exclude:
- "spec/unit/fixtures/**/*"

Style/PercentLiteralDelimiters:
Exclude:
- "lib/chef-cli/skeletons/**/*"

Layout/TrailingEmptyLines:
Exclude:
- "spec/unit/fixtures/**/*"
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ group :test do
gem "rspec-expectations", "~> 3.8"
gem "rspec-mocks", "~> 3.8"
gem "cookstyle"
gem "chefstyle"
gem "faraday_middleware"
gem "chef-test-kitchen-enterprise", git: "https://github.com/chef/chef-test-kitchen-enterprise", branch: "main"
gem "simplecov", require: false
Expand Down
24 changes: 1 addition & 23 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require "bundler/gem_tasks"

namespace :style do
begin
require "cookstyle/chefstyle"
require "rubocop/rake_task"

desc "Run Cookbook Ruby style checks"
Expand All @@ -30,28 +31,5 @@ namespace :style do
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV["CI"]
end

begin
require "rubocop/rake_task"

ignore_dirs = Regexp.union(%w{
lib/chef-cli/skeletons/code_generator
spec/unit/fixtures/chef-runner-cookbooks
spec/unit/fixtures/cookbook_cache
spec/unit/fixtures/example_cookbook
spec/unit/fixtures/example_cookbook_metadata_json_only
spec/unit/fixtures/example_cookbook_no_metadata
spec/unit/fixtures/local_path_cookbooks
})

desc "Run Chef Ruby style checks"
RuboCop::RakeTask.new(:chefstyle) do |t|
t.requires = ["chefstyle"]
t.patterns = `rubocop --list-target-files`.split("\n").reject { |f| f =~ ignore_dirs }
t.options = ["--display-cop-names"]
end
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV["CI"]
end
end

Loading