Skip to content

Documentation for Invoke-ScriptAnalyzer -Settings is out-of-date #1270

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

Closed
travisclagrone opened this issue Jun 22, 2019 · 2 comments · Fixed by #1272
Closed

Documentation for Invoke-ScriptAnalyzer -Settings is out-of-date #1270

travisclagrone opened this issue Jun 22, 2019 · 2 comments · Fixed by #1272

Comments

@travisclagrone
Copy link
Contributor

Expected value

...

A Script Analyzer profile file is a text file that contains a hash table with one or more of the following keys:

	-- Severity

    -- IncludeRules

    -- ExcludeRules

    -- Rules

    -- CustomRulePath

	-- RecurseCustomRulePath

    -- IncludeDefaultRules

...

* Ellipses indicate elision.

Actual behavior

Missing key "RecurseCustomRulePath".

...

A Script Analyzer profile file is a text file that contains a hash table with one or more of the following keys:

	-- Severity

    -- IncludeRules

    -- ExcludeRules

    -- Rules

    -- CustomRulePath

    -- IncludeDefaultRules

...

* Ellipses indicate elision.

Environment data

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.17763 
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.2.1}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


PS> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }

1.18.0

@bergmeister
Copy link
Collaborator

bergmeister commented Jun 22, 2019

Thanks, do you intent to open a PR for it? I have not written the RecurseCustomRulePath myself so would have to guess what it does but from what I have seen it makes it possible to specify a folder instead of a file for the use case of having custom rules in multiple files (or I guess also when using module manifests?). Having a look at the tests might help clarify as well.
P.S. We released PSSA 1.18.1 last week (this issue still applies though) and also changed the default of the main repo of this branch to be master instead of development, therefore you might want also want change the default branch in your fork as well to be master.
https://devblogs.microsoft.com/powershell/release-of-powershell-script-analyzer-1-18-1

@travisclagrone
Copy link
Contributor Author

Thanks, do you intent to open a PR for it? I have not written the RecurseCustomRulePath myself so would have to guess what it does but from what I have seen it makes it possible to specify a folder instead of a file for the use case of having custom rules in multiple files (or I guess also when using module manifests?). Having a look at the tests might help clarify as well.
P.S. We released PSSA 1.18.1 last week (this issue still applies though) and also changed the default of the main repo of this branch to be master instead of development, therefore you might want also want change the default branch in your fork as well to be master.
devblogs.microsoft.com/powershell/release-of-powershell-script-analyzer-1-18-1

Yes, I do intend to open a PR for it. And thanks for the heads up; I've rebased my branches onto master now.

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