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

Fix ChefModernize/UnnecessaryDependsChef14 to detect version constraints #325

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Oct 11, 2019

Update the node match to match any AST nodes after the method which will include any version constraint. I also improved the warning and docs for this cop.

Signed-off-by: Tim Smith tsmith@chef.io

Copy link

@afiune afiune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenor-52223901

lib/rubocop/cop/chef/modernize/chef_14_resources.rb Outdated Show resolved Hide resolved
tas50 and others added 3 commits October 14, 2019 08:57
Update the node match to match any AST nodes after the method which will include any version constraint. I also improved the warning and docs for this cop.

Signed-off-by: Tim Smith <tsmith@chef.io>
In general I try to keep the message pretty short, but I think this actually gives the user pretty critical information on why you shouldn't do that.

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: Salim Afiune <afiune@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 force-pushed the fix_UnnecessaryDependsChef14 branch from 0de87a6 to e5cb7b3 Compare October 14, 2019 15:59
@tas50 tas50 merged commit a547634 into master Oct 14, 2019
@chef-expeditor chef-expeditor bot deleted the fix_UnnecessaryDependsChef14 branch October 14, 2019 16:12
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