chef / cookstyle

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.
Apache License 2.0
107 stars 54 forks source link

Add chefstyle library file for Rake backwards compatibility #969

Closed dafyddcrosby closed 7 months ago

dafyddcrosby commented 7 months ago

Description

There's a decent amount of Rake code that uses require "chefstyle" to set the defaults for RuboCop (eg https://github.com/chef/ohai/blob/6d64237f9987c3bf51805e19884e6e710c3a40f6/Rakefile#L19), and rather than doing surgery on each repo's Rakefile, it'd be easier to keep that same behavior for loading the configuration and cops. With this change a migration involving Rake should only involve a Gemfile update and changing require "chefstyle" to require "cookstyle/chefstyle".

Related Issue

Types of changes

Checklist:

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud