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
{{ message }}
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
rubocop /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator
Inspecting 18 files
CCWCWCCCCCCCC.C...
Offenses:
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/metadata.rb:8:1: C: 1 trailing blank lines detected.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:59:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe.rb.erb"
^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:73:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe_spec.rb.erb"
^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:80:3: C: Favor unless over if for negative conditions.
if !context.skip_git_init ...
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:81:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("initialize-git") do
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:82:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git init .")
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/app.rb:87:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "gitignore"
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:4:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
files_dir = File.join(cookbook_dir, "files", "default")
^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:4:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
files_dir = File.join(cookbook_dir, "files", "default")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:5:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
cookbook_file_path = File.join(cookbook_dir, "files", "default", context.new_file_basename)
^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:5:55: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
cookbook_file_path = File.join(cookbook_dir, "files", "default", context.new_file_basename)
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:5:81: C: Line is too long. [91/80]
cookbook_file_path = File.join(cookbook_dir, "files", "default", context.new_file_basename)
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:11:16: W: Assignment in condition - you probably meant to use ==.
if source_file = context.content_source
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb:20:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "cookbook_file.erb"
^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:4:39: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
recipe_path = File.join(cookbook_dir, "recipes", "#{context.new_file_basename}.rb")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:4:81: C: Line is too long. [83/80]
recipe_path = File.join(cookbook_dir, "recipes", "#{context.new_file_basename}.rb")
^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:5:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec_helper_path = File.join(cookbook_dir, "spec", "spec_helper.rb")
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:5:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec_helper_path = File.join(cookbook_dir, "spec", "spec_helper.rb")
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:6:36: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec_dir = File.join(cookbook_dir, "spec", "unit", "recipes")
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:6:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec_dir = File.join(cookbook_dir, "spec", "unit", "recipes")
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:6:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
spec_dir = File.join(cookbook_dir, "spec", "unit", "recipes")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:8:38: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
inspec_dir = File.join(cookbook_dir, "test", "smoke", "default")
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:8:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
inspec_dir = File.join(cookbook_dir, "test", "smoke", "default")
^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:8:55: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
inspec_dir = File.join(cookbook_dir, "test", "smoke", "default")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:11:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if File.directory?(File.join(cookbook_dir, "test", "recipes"))
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:11:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
if File.directory?(File.join(cookbook_dir, "test", "recipes"))
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:31:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe_spec.rb.erb"
^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb:49:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe.rb.erb"
^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:4:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
template_dir = File.join(cookbook_dir, "templates", "default")
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:4:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
template_dir = File.join(cookbook_dir, "templates", "default")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:7:43: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
unless File.extname(template_filename) == ".erb"
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:13:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
template_path = File.join(cookbook_dir, "templates", template_filename)
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:19:16: W: Assignment in condition - you probably meant to use ==.
if source_file = context.content_source
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/template.rb:28:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "template.erb"
^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:5:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
dot_delivery_dir = File.join(delivery_project_dir, ".delivery")
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:7:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Ensuring delivery configuration")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:11:43: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
cookbook_file File.join(dot_delivery_dir, "config.json") do
^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:12:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "delivery-config.json"
^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:16:43: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
cookbook_file File.join(dot_delivery_dir, "project.toml") do
^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:17:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "delivery-project.toml"
^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:20:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Ensuring correct delivery build cookbook content")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:22:50: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
build_cookbook_dir = File.join(dot_delivery_dir, "build_cookbook")
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:29:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "build_cookbook/metadata.rb.erb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:36:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "build_cookbook/README.md"
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:52:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "build_cookbook/Berksfile.erb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:60:81: C: Line is too long. [103/80]
%w(default deploy functional lint provision publish quality security smoke syntax unit).each do |phase|
^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:71:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "build_cookbook/.kitchen.yml"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:95:81: C: Line is too long. [88/80]
cookbook_file "#{build_cookbook_dir}/test/fixtures/cookbooks/test/recipes/default.rb" do
^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:96:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "build_cookbook/test-fixture-recipe.rb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:112:81: C: Line is too long. [89/80]
if context.have_git && context.delivery_project_git_initialized && !context.skip_git_init
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:114:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Adding delivery configuration to feature branch")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:116:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-create-feature-branch") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:117:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git checkout -t -b add-delivery-configuration")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:119:1: C: Trailing whitespace detected.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:120:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
not_if "git branch |grep \"add-delivery-configuration\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:123:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-add-delivery-config-json") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:124:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git add .delivery/config.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:127:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
only_if "git status --porcelain |grep \".\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:132:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-add-delivery-project-toml") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:133:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git add .delivery/project.toml")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:136:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
only_if "git status --porcelain |grep \".\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:139:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-commit-delivery-config") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:140:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git commit -m \"Add generated delivery configuration\"")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:143:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
only_if "git status --porcelain |grep \".\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:146:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Adding build cookbook to feature branch")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:148:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-add-delivery-build-cookbook-files") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:149:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git add .delivery")
^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:152:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
only_if "git status --porcelain |grep \".\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:155:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-commit-delivery-build-cookbook") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:156:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git commit -m \"Add generated delivery build cookbook\"")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:159:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
only_if "git status --porcelain |grep \".\""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:167:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Merging delivery content feature branch to master")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:169:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-merge-delivery-config-branch") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:170:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git merge --no-ff add-delivery-configuration")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:174:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-remove-delivery-config-branch") do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb:175:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git branch -D add-delivery-configuration")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb:4:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute_dir = File.join(cookbook_dir, "attributes")
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb:5:42: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
attribute_path = File.join(cookbook_dir, "attributes", "#{context.new_file_basename}.rb")
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb:5:81: C: Line is too long. [89/80]
attribute_path = File.join(cookbook_dir, "attributes", "#{context.new_file_basename}.rb")
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb:10:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "attribute.rb.erb"
^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:15:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "repo/dot-chef-repo.txt"
^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:20:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "repo/README.md"
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:25:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "chefignore"
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:29:25: C: %w-literals should be delimited by ( and ).
directories_to_create = %w{ cookbooks data_bags }
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:29:28: C: Do not use spaces inside percent literal delimiters.
directories_to_create = %w{ cookbooks data_bags }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:29:48: C: Do not use spaces inside percent literal delimiters.
directories_to_create = %w{ cookbooks data_bags }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:31:1: C: Use the return of the conditional for variable assignment and comparison.
if context.use_roles ...
^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:32:28: C: %w-literals should be delimited by ( and ).
directories_to_create += %w{ roles environments }
^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:32:31: C: Do not use spaces inside percent literal delimiters.
directories_to_create += %w{ roles environments }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:32:50: C: Do not use spaces inside percent literal delimiters.
directories_to_create += %w{ roles environments }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:34:28: C: %w-literals should be delimited by ( and ).
directories_to_create += %w{ policies }
^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:34:31: C: Do not use spaces inside percent literal delimiters.
directories_to_create += %w{ policies }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:34:40: C: Do not use spaces inside percent literal delimiters.
directories_to_create += %w{ policies }
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:46:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "cookbook_readmes/README-policy.md"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:48:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "cookbook_readmes/README.md"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:55:3: C: Favor unless over if for negative conditions.
if !context.skip_git_init ...
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:56:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("initialize-git") do
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:57:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git init .")
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/repo.rb:63:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "repo/gitignore.erb"
^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/policyfile.rb:3:81: C: Line is too long. [86/80]
policyfile_path = File.join(context.policyfile_dir, "#{context.new_file_basename}.rb")
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/policyfile.rb:6:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "Policyfile.rb.erb"
^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb:5:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
resource_dir = File.join(cookbook_dir, "resources")
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb:8:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
provider_dir = File.join(cookbook_dir, "providers")
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb:14:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "resource.rb.erb"
^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb:21:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "provider.rb.erb"
^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:7:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Ensuring correct cookbook file content")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:37:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "Policyfile.rb.erb"
^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:43:1: C: Extra blank line detected.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:46:1: C: Extra empty line detected at block body beginning.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:74:1: C: Extra empty line detected at block body beginning.
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:76:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "spec_helper.rb"
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:78:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "spec_helper_policyfile.rb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:85:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe_spec.rb.erb"
^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:95:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "recipe.rb.erb"
^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:104:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
generator_desc("Committing cookbook files to git")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:106:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("initialize-git") do
^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:107:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git init .")
^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:114:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
source "gitignore"
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:119:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-add-new-files") do
^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:120:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git add .")
^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:124:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
execute("git-commit-new-files") do
^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:125:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
command("git commit -m \"Add generated cookbook content\"")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:131:1: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
if context.enable_delivery
^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb:133:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
include_recipe "::build_cookbook"
^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb:1:1: C: The name of this source file (test-fixture-recipe.rb) should use snake_case.
%w(unit lint syntax).each do |phase|
^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb:3:81: C: Line is too long. [106/80]
execute "HOME=/home/vagrant delivery job verify #{phase} --server localhost --ent test --org kitchen" do
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb:4:30: C: Prefer single-quoted strings inside interpolations.
log "Welcome to Chef, #{node["example"]["name"]}!" do
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb:4:41: C: Prefer single-quoted strings inside interpolations.
log "Welcome to Chef, #{node["example"]["name"]}!" do
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb:5:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
default["example"]["name"] = "Sam Doe"
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb:5:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
default["example"]["name"] = "Sam Doe"
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb:5:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
default["example"]["name"] = "Sam Doe"
^^^^^^^^^
18 files inspected, 131 offenses detected
The text was updated successfully, but these errors were encountered:
default["example"]["name"] = "Sam Doe"
^^^^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb:5:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
default["example"]["name"] = "Sam Doe"
^^^^^^
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb:5:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
default["example"]["name"] = "Sam Doe"
^^^^^^^^^
18 files inspected, 116 offenses detected
Description
Rubocop v0.46.0 detects 131 offenses with the skeleton code_generator cookbook
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-dk-1.2.22/lib/chef-dk/skeletons/code_generator
ChefDK Version
Chef Development Kit Version: 1.2.22
chef-client version: 12.18.31
delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c)
berks version: 2017-02-08T16:19:36.001800 24418] 2017-02-08T16:19:36.001923 24418] 2017-02-08T16:19:36.002008 24418] 2017-02-08T16:19:36.002117 24418] 2017-02-08T16:19:36.030319 24418] 2017-02-08T16:19:36.030426 24418] 5.6.0
kitchen version: 1.15.0
Platform Version
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Replication Case
Stacktrace
The text was updated successfully, but these errors were encountered: