PSScriptAnalyzerSettings.psd1
<#
.SYNOPSIS Based on the PowerShell Script Analyzer (PSSA) presets. .LINK https://github.com/PowerShell/PSScriptAnalyzer/blob/master/Engine/Settings/ #> @{ Severity = @( 'Error', 'Warning', 'Information' ) IncludeRules = @( 'PSAvoidDefaultValueSwitchParameter', 'PSAvoidGlobalVars', 'PSAvoidUsingCmdletAliases', 'PSAvoidUsingComputerNameHardcoded', 'PSAvoidUsingConvertToSecureStringWithPlainText', 'PSAvoidUsingDoubleQuotesForConstantString', 'PSAvoidUsingEmptyCatchBlock', 'PSAvoidUsingInvokeExpression', 'PSAvoidUsingPlainTextForPassword', 'PSAvoidUsingPositionalParameters', 'PSAvoidUsingUserNameAndPasswordParams', 'PSAvoidUsingWMICmdlet', 'PSAvoidUsingWriteHost', 'PSDSC*', 'PSMissingModuleManifestField', 'PSPlaceCloseBrace', 'PSPlaceOpenBrace', 'PSProvideCommentHelp', 'PSReservedCmdletChar', 'PSReservedParams', 'PSShouldProcess', 'PSUseApprovedVerbs', 'PSUseCmdletCorrectly', 'PSUseConsistentIndentation', 'PSUseConsistentWhitespace', 'PSUseCorrectCasing', 'PSUseDeclaredVarsMoreThanAssignments', 'PSUsePSCredentialType', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseSingularNouns' ) Rules = @{ PSPlaceOpenBrace = @{ Enable = $true OnSameLine = $true NewLineAfter = $true IgnoreOneLineBlock = $true } PSPlaceCloseBrace = @{ Enable = $true NewLineAfter = $false IgnoreOneLineBlock = $true NoEmptyLineBefore = $false } PSUseConsistentIndentation = @{ Enable = $true Kind = 'space' PipelineIndentation = 'IncreaseIndentationForFirstPipeline' IndentationSize = 4 } PSUseConsistentWhitespace = @{ Enable = $true CheckInnerBrace = $true CheckOpenBrace = $true CheckOpenParen = $true CheckOperator = $true CheckPipe = $true CheckPipeForRedundantWhitespace = $false CheckSeparator = $true CheckParameter = $false IgnoreAssignmentOperatorInsideHashTable = $true } PSUseCorrectCasing = @{ Enable = $true } PSAvoidUsingDoubleQuotesForConstantString = @{ Enable = $true } } } |