-
Notifications
You must be signed in to change notification settings - Fork 7
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 a cop for detecting legacy powershell methods #123
Conversation
We shouldn't use these anywhere now that we have the improved methods Signed-off-by: Tim Smith <tsmith@chef.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine. No autocorrect?
config/chefstyle.yml
Outdated
Description: Use powershell_exec!/powershell_exec instead of the slower legacy powershell_out!/powershell_out methods. | ||
Enabled: true | ||
VersionAdded: '1.6.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does your editor not properly end files? :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I turned it on now just for you. It causes a lot of issues with other projects that get grumpy about newlines
It's not really something we can autocorrect since it returns a totally different type of data. You have to refactor (for the better) the code to use the new method. |
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
::cough:: ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Signed-off-by: Tim Smith <tsmith@chef.io>
We shouldn't use these anywhere now that we have the improved methods
Signed-off-by: Tim Smith tsmith@chef.io