You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Thanks for putting together this project. I wanted to let you know about an issue with the Rake/Desc cop.
An error occurred while Rake/Desc cop was inspecting /Users/tsmith/dev/work/chef-dk/Rakefile:36:47.
undefined method `send_type?' for :name:Symbol
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-rake-0.5.0/lib/rubocop/cop/rake/desc.rb:50:in `task_with_desc?'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-rake-0.5.0/lib/rubocop/cop/rake/desc.rb:36:in `on_task'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-rake-0.5.0/lib/rubocop/cop/rake/helper/on_task.rb:17:in `on_send'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:128:in `with_cop_error_handling'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:55:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:107:in `block in on_send'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `each_with_index'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `on_send'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `block in on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `block in on_dstr'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `on_dstr'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:107:in `block in on_send'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `each_with_index'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:104:in `on_send'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:141:in `on_if'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:169:in `block in on_case'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:168:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:168:in `on_case'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:169:in `block in on_case'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:168:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:168:in `on_case'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `block in on_kwbegin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `on_kwbegin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `block in on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:164:in `on_block'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `block in on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:50:in `on_begin'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:33:in `block (2 levels) in <class:Commissioner>'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/traversal.rb:13:in `walk'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/team.rb:119:in `investigate'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/team.rb:107:in `offenses'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/team.rb:44:in `inspect_file'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:283:in `inspect_file'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:231:in `block in do_inspection_loop'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:263:in `block in iterate_until_no_changes'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:256:in `loop'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:256:in `iterate_until_no_changes'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:227:in `do_inspection_loop'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:124:in `block in file_offenses'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:142:in `file_offense_cache'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:122:in `file_offenses'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:110:in `process_file'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:87:in `block in each_inspected_file'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `each'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `reduce'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `each_inspected_file'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:73:in `inspect_files'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:39:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:210:in `execute_runner'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:80:in `execute_runners'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:51:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/exe/rubocop:13:in `block in <top (required)>'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/usr/local/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/exe/rubocop:12:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/chefstyle-0.14.0/bin/chefstyle:13:in `load'
/usr/local/lib/ruby/gems/2.6.0/gems/chefstyle-0.14.0/bin/chefstyle:13:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/bin/chefstyle:23:in `load'
/usr/local/lib/ruby/gems/2.6.0/bin/chefstyle:23:in `<main>'```
Here's the content of the Rakefile:
```ruby
#
# Copyright:: Copyright (c) 2016-2018 Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
begin
require_relative "tasks/dependencies"
require_relative "tasks/announce"
rescue LoadError
puts "Additional rake tasks not found. If you require these rake tasks run Rake from the git repo not the installation files!"
end
namespace :style do
begin
require "rubocop/rake_task"
desc "Run Cookbook Ruby style checks"
RuboCop::RakeTask.new(:cookstyle) do |t|
t.requires = ["cookstyle"]
t.patterns = ["lib/chef-dk/skeletons/code_generator"]
t.options = ["--display-cop-names"]
end
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-dk/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 Cookstyle 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
The text was updated successfully, but these errors were encountered:
Hi there. Thanks for putting together this project. I wanted to let you know about an issue with the
Rake/Desc
cop.The text was updated successfully, but these errors were encountered: