-
Notifications
You must be signed in to change notification settings - Fork 498
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
Updates to Examples PSSA settings file to include more rule config #1312
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# The PowerShell Script Analyzer will generate a warning | ||
# diagnostic record for this file due to a bug - | ||
# https://github.com/PowerShell/PSScriptAnalyzer/issues/472 | ||
# For more information on PSScriptAnalyzer settings see: | ||
# https://github.com/PowerShell/PSScriptAnalyzer/blob/master/README.md#settings-support-in-scriptanalyzer | ||
@{ | ||
# Only diagnostic records of the specified severity will be generated. | ||
# Uncomment the following line if you only want Errors and Warnings but | ||
|
@@ -25,4 +24,48 @@ | |
# Note: if a rule is in both IncludeRules and ExcludeRules, the rule | ||
# will be excluded. | ||
#ExcludeRules = @('PSAvoidUsingWriteHost') | ||
|
||
# You can use rule configuration to configure rules that support it: | ||
#Rules = @{ | ||
# PSAlignAssignmentStatement = @{ | ||
# Enable = $true | ||
# CheckHashtable = $true | ||
# } | ||
# PSAvoidUsingCmdletAliases = @{ | ||
# Whitelist = @("cd") | ||
# } | ||
# PSPlaceCloseBrace = @{ | ||
# Enable = $true | ||
# NoEmptyLineBefore = $false | ||
# IgnoreOneLineBlock = $true | ||
# NewLineAfter = $true | ||
# } | ||
# PSPlaceOpenBrace = @{ | ||
# Enable = $true | ||
# OnSameLine = $true | ||
# NewLineAfter = $true | ||
# IgnoreOneLineBlock = $true | ||
# } | ||
# PSProvideCommentHelp = @{ | ||
# Enable = $true | ||
# ExportedOnly = $false | ||
# BlockComment = $true | ||
# VSCodeSnippetCorrection = $false | ||
# Placement = "before" | ||
# } | ||
# PSUseCompatibleCmdlets = @{ | ||
# compatibility = @("core-6.0.0-alpha-windows", "core-6.0.0-alpha-linux") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to merge this PR before the release next week, which will delete those files and replace it with newer ones. Therefore I would remove this example, you do not need to document PSSA details. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd much prefer a link to a list of configurable PSSA rules but I didn't see one. I spent ~10 minutes going through every single rule doc, looking for the ones that are configurable. I think it would be nice if PSSA had a list of configurable rules that could be linked to. :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My point is that somewhere in this README it would be helpful to have a list of the configurable rules. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have deleted this ReadMe already in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that's too bad. I just submitted a PR to fix the broken links and add a column for |
||
# } | ||
# PSUseConsistentIndentation = @{ | ||
# Enable = $true | ||
# IndentationSize = 4 | ||
# } | ||
# PSUseConsistentWhitespace = @{ | ||
# Enable = $true | ||
# CheckOpenBrace = $true | ||
# CheckOpenParen = $true | ||
# CheckOperator = $true | ||
# CheckSeparator = $true | ||
# } | ||
# } | ||
} |
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.
Also linking to the shipped settings files (as real examples) could be useful: https://github.com/PowerShell/PSScriptAnalyzer/tree/master/Engine/Settings