cookstyle icon indicating copy to clipboard operation
cookstyle copied to clipboard

A linting tool that helps you to write better Chef Infra cookbooks and InSpec profiles by detecting and automatically correcting style, syntax, and logic mistakes in your code.

Results 113 cookstyle issues
Sort by recently updated
recently updated
newest added

# Version: Chef Workstation 22.2.807 Cookstyle 7.32.0 # Environment: Debian 11 # Scenario: We use a _cookbook_file_ resource to process a file in _/etc/cron.daily_ # Steps to Reproduce: Add the...

Type: Bug
Status: Untriaged

/etc/cron.deny is matching with the `Chef/Modernize/CronDFileOrTemplate` cop. Example: ```ruby file '/etc/cron.deny' do action :delete end ```

Type: Bug
Status: Untriaged

```ruby unified_mode true if respond_to?(:unified_mode) ``` That isn't a coherent thing to ever want to do, since you get `unified_mode true` behavior on newer chef-client and `unified_mode false` behavior on...

Status: Untriaged
New Cop Proposal

Detect deps on chef-sugar cookbook, deps on chef-sugar gem, and `include_recipe 'chef-sugar'`

Type: Bug
Status: Untriaged

``` execute 'execute-scheduled-karaf-restart' do command 'rm -f /tmp/karaf-restart' action :run notifies :stop, 'service[karaf-deploy-stop]', :immediately # notifies cache folders deletion $karaf_cache.each do |cache_folder| notifies :delete, "directory[#{cache_folder}]", :immediately end notifies :start, 'service[karaf]',...

Status: Waiting on Contributor
Triage: Feature Request
New Cop Proposal

### What category of cop is this?: Please try to select as few as possible. - [ ] ChefDeprecations - A cop that alerts on a deprecation in the Chef...

New Cop Proposal

### What category of cop is this?: Please try to select as few as possible. - [ ] Chef/Deprecations - A cop that alerts on a deprecation in the Chef...

Status: Untriaged
New Cop Proposal

### What category of cop is this?: Please try to select as few as possible. - [ ] Chef/Deprecations - A cop that alerts on a deprecation in the Chef...

Status: Untriaged
New Cop Proposal

# Version: 7.24.1 # Environment: N/A # Steps to Reproduce: ```ruby cmd = Mixlib::ShellOut.new("#{nginx_binary} -t -c #{new_resource.config_file}") cmd.run_command.error! ``` # Expected Result: ```ruby shell_out!("#{nginx_binary} -t -c #{new_resource.config_file}") ``` # Actual...

Type: Bug
Status: Untriaged

When someone does this ```ruby file tokenpath do owner new_resource.owner group new_resource.group mode '644' content authz.file_content action :nothing end.run_action(:create) ``` We should autocorrect to: ```ruby file tokenpath do owner new_resource.owner...

Type: Bug
Status: Untriaged