Skip to content

Commit

Permalink
Updates to Examples PSSA settings file to include more rule config (#…
Browse files Browse the repository at this point in the history
…1312)

* Updates to Examples PSSA settings file to include more rule config

* Address PR feedback

* Fix typo - defualt

* Whitespace only change
  • Loading branch information
rkeithhill authored May 7, 2018
1 parent 6c597e7 commit be5d727
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions examples/PSScriptAnalyzerSettings.psd1
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# The PowerShell Script Analyzer will generate a warning
# diagnostic record for this file due to a bug -
# https://github.com/PowerShell/PSScriptAnalyzer/issues/472
# Use the PowerShell extension setting `powershell.scriptAnalysis.settingsPath` to get the current workspace
# to use this PSScriptAnalyzerSettings.psd1 file to configure code analysis in Visual Studio Code.
# This setting is configured in the workspace's `.vscode\settings.json`.
#
# For more information on PSScriptAnalyzer settings see:
# https://github.com/PowerShell/PSScriptAnalyzer/blob/master/README.md#settings-support-in-scriptanalyzer
#
# You can see the predefined PSScriptAnalyzer settings here:
# https://github.com/PowerShell/PSScriptAnalyzer/tree/master/Engine/Settings
@{
# Only diagnostic records of the specified severity will be generated.
# Uncomment the following line if you only want Errors and Warnings but
# not Information diagnostic records.
#Severity = @('Error','Warning')

# Analyze **only** the following rules. Use IncludeRules when you want
# to invoke only a small subset of the defualt rules.
# to invoke only a small subset of the default rules.
IncludeRules = @('PSAvoidDefaultValueSwitchParameter',
'PSMisleadingBacktick',
'PSMissingModuleManifestField',
Expand All @@ -25,4 +31,11 @@
# 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 = @{
# PSAvoidUsingCmdletAliases = @{
# Whitelist = @("cd")
# }
#}
}

0 comments on commit be5d727

Please sign in to comment.