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 UseCompatibleSyntax class error message #1215

Merged

Conversation

rjmholt
Copy link
Contributor

@rjmholt rjmholt commented Apr 11, 2019

PR Summary

A bug in the UseCompatibleSyntax rule means error messages come out looking very bad. This fixes that.

PR Checklist

Copy link
Collaborator

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

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

Good spot. Looks good to me.
Optional suggestion would be to create a wrapper function for creating the error message since there are now 6 usages of Strings.UseCompatibleSyntaxError, this would improve readability when using named parameters to call it and would also add a small safety net since one only sees a mismatch of number of parameter at runtime.

Copy link
Member

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

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

looks fine

@JamesWTruher JamesWTruher merged commit 3f69f93 into PowerShell:development Apr 23, 2019
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

3 participants