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

[chefstyle] import Chefstyle cops and config #968

Merged
merged 6 commits into from
Jan 23, 2024

Conversation

dafyddcrosby
Copy link
Collaborator

Description

There's already a lot of overlap with Chefstyle, and maintaining one repo instead of two makes development and maintenance easier for everyone. I've imported the files from main (currently https://github.com/chef/chefstyle/tree/129344227d927ea67f228540654a6718265d03cd) and only changed chefstyle.yml as Chef/Ruby/Ruby27KeywordArgumentWarnings is already available in Cookstyle as Chef/Deprecations/Ruby27KeywordArgumentWarnings.

To run the chefstyle configs one uses the --chefstyle argument (captured in bin/cookstyle to avoid more invasive patching of RuboCop), which uses chefstyle.yml instead of cookstyle.yml.

Diff of bin/chefstyle --show-cops in chefstyle repo and bin/cookstyle --chefstyle --show-cops: https://gist.github.com/dafyddcrosby/417dde82d1507313f59dae80898c5271

While this makes the imported Chef/Ruby cops available to Cookstyle, they are disabled by default. Before and after diff of cookstyle --show-cops: https://gist.github.com/dafyddcrosby/922112f26f0d90f66a4d7b832f7a465a

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.

There's already a lot of overlap with Chefstyle, and maintaining one repo instead of two makes
development and maintenance easier for everyone.

Adds --chefstyle argument, which uses chefstyle.yml instead of cookstyle.yml

Didn't import Ruby27KeywordArgumentWarnings, since it's already in Cookstyle

Signed-off-by: David Crosby <dcrosby@fb.com>
@dafyddcrosby dafyddcrosby requested review from a team as code owners January 16, 2024 21:00
Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
Copy link

sonarcloud bot commented Jan 23, 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 936d856 into chef:main Jan 23, 2024
10 checks passed
dafyddcrosby added a commit to dafyddcrosby/chefstyle that referenced this pull request Jan 30, 2024
Chefstyle was merged into Cookstyle in
chef/cookstyle#968, and so there's no longer a
reason to keep a separate repository. Any future fixes to the Chefstyle
configuration should be handled in the Cookstyle repository.

Once all the Chef github org repositories and major reverse dependencies on the
gem (https://rubygems.org/gems/chefstyle/reverse_dependencies) are addressed,
it can be sent to chef-boneyard.

Signed-off-by: David Crosby <dcrosby@fb.com>
sean-simmons-progress pushed a commit to chef/chefstyle that referenced this pull request Feb 6, 2024
Chefstyle was merged into Cookstyle in
chef/cookstyle#968, and so there's no longer a
reason to keep a separate repository. Any future fixes to the Chefstyle
configuration should be handled in the Cookstyle repository.

Once all the Chef github org repositories and major reverse dependencies on the
gem (https://rubygems.org/gems/chefstyle/reverse_dependencies) are addressed,
it can be sent to chef-boneyard.

Signed-off-by: David Crosby <dcrosby@fb.com>
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.

2 participants