Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chefstyle library file for Rake backwards compatibility #969

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

dafyddcrosby
Copy link
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@dafyddcrosby dafyddcrosby requested review from a team as code owners January 30, 2024 20:15
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"`.

Signed-off-by: David Crosby <dcrosby@fb.com>
Copy link

sonarcloud bot commented Jan 30, 2024

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

@tpowell-progress tpowell-progress merged commit ee47540 into chef:main Feb 6, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants