cookstyle
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.
# Version: - Chef Workstation: 22.7.1006 (Stable) - Cookstyle 7.32.1 / RuboCop 1.25.1 # Environment: - OS: macOS 12.5.1 # Scenario: Linting cookbooks # Steps to Reproduce: 0. `mkdir -p...
## Motivation As a Chef power user, I want to use the latest and greatest Cops, so that I can see and fix problems early, and get the most out...
Documentation still references http://rubocop.org for URLs, which works but isn't as secure as using https://rubocop.org (good newbie task) See https://github.com/chef/cookstyle/blob/2971520aef809f5f40fb02cd1c2480410fb376d7/README.md#L13
# Version: ``` Cookstyle 7.32.1 * RuboCop 1.25.1 ``` # Environment: MacOS 11.6.4 running Chef Workstation 22.10.1013 using example cookbook code. # Scenario: When file resources iterate through loops and...
## Description Update rubocop version to be in sync with Ruby 3.1 checks. ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [...
# Version: ``` cookstyle (7.32.1) rubocop (1.25.1) rubocop-ast (1.24.1) ``` # Environment: Ruby 3.0.3 with Gemfile.lock # Scenario: Trying to lint/find Chef resources that use node attributes for default property...
# Version: Cookstyle 7.32.8 # Environment: ``` ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux] Cookstyle 7.32.8 RuboCop 1.25.1 ``` # Scenario: Running cookstyle > 7.32.2 with `TargetChefVersion` specified in config #...
We need to pass TargetChefVersion into the default config, otherwise the [ConfigValidator#each_invalid_parameter method complains](https://github.com/rubocop/rubocop/blob/2fee8552c6c8237950d8df7ec857c49f308a6d34/lib/rubocop/config_validator.rb#L198) ## Description ## Related Issue ## Types of changes - [X] Bug fix (non-breaking change which...
# Version: All # Environment: All # Scenario: Run cookstyle against valid Chefspec file and specify `ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023')` # Steps to Reproduce: Create any Chefspec spec.rb file and...
After the Cookstyle hack fest, the amount of boilerplate necessary to create a new Cop became apparent, and this seems like a problem worth solving. ## Motivation As a new...