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 a cop for detecting legacy powershell methods #123

Merged
merged 2 commits into from
Jan 22, 2021
Merged

Add a cop for detecting legacy powershell methods #123

merged 2 commits into from
Jan 22, 2021

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Jan 21, 2021

We shouldn't use these anywhere now that we have the improved methods

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>
@tas50 tas50 added the Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number. label Jan 22, 2021
Copy link

@jaymzh jaymzh left a 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?

Description: Use powershell_exec!/powershell_exec instead of the slower legacy powershell_out!/powershell_out methods.
Enabled: true
VersionAdded: '1.6.0'
Copy link

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? :(

Copy link
Contributor Author

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

@tas50
Copy link
Contributor Author

tas50 commented Jan 22, 2021

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
Copy link

Choose a reason for hiding this comment

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

::cough:: ;)

Copy link
Contributor Author

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants