★ wanayoo — archive 1999 https://github.com/PowerShell/PSScriptAnalyzer/issues/1512Nouvelle recherche | Portail wanayoo
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

UseCompatibleSyntax.md Documentation Out of Date #1512

Open
franklesniak opened this issue May 22, 2020 · 3 comments
Open

UseCompatibleSyntax.md Documentation Out of Date #1512

franklesniak opened this issue May 22, 2020 · 3 comments
Assignees

Comments

@franklesniak
Copy link

@franklesniak franklesniak commented May 22, 2020

It appears that the documentation UseCompatibleSyntax.md is out of date. I say this because the markdown file lists 6.0 as the newest version that can be checked, but this page shows 6.2:
DevBlogs Post About PSScriptAnalyzer

Also, I presume 7.0 is also supported by this point?

Can this page be updated to show the versions that can be checked? Thanks in advance!

@bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented May 22, 2020

As per PSSA 1.19.0 release post here, PowerShell 7 syntax support has been added (mainly in PR #1331 and #1426). The markdown doc is more of an example but should be enhanced to include all supported versions for that rule or at least the maximum supported version of the last PSSA release.

@rjmholt Looking at the code, here and here it seems that the rule only takes the major versions internally only anyway. Not much of an issue atm because it's a hidden implementation detail with no impact to the user but that will probably have to change for PowerShell 7.1/7.2

@franklesniak
Copy link
Author

@franklesniak franklesniak commented May 22, 2020

You confirmed what I suspected after reviewing that same code, i.e., that only major versions matter (3.0 - 7.0). Thanks for that - it gets me by for now.

@rjmholt
Copy link
Member

@rjmholt rjmholt commented May 22, 2020

that only major versions matter

That's true so long as new syntax isn't introduced in a minor version; the rule is based on syntactic changes made from version to version, and so far no minor version has introduced new syntaxes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.