forked from OCram85/PSCredentialStore
adds DroneHelper (#61)
#### 📖 Summary - adds DroneHelper for build pipeline #### 📑 Test Plan > 💡 Select your test plan for the code changes. - [x] Tested via Drone.io pipeline - [ ] Custom test - [ ] No test plan ##### Details / Justification <!-- Add your test details or justification for missing tests here. --> #### 📚 Additional Notes - FileLint / Lint & Pester issues will be fixed in next PR Co-authored-by: OCram85 <marco.blessing@googlemail.com> Reviewed-on: OCram85/PSCredentialStore#61
This commit is contained in:
139
resources/PSScriptAnalyzerSettings.psd1
Normal file
139
resources/PSScriptAnalyzerSettings.psd1
Normal file
@ -0,0 +1,139 @@
|
||||
@{
|
||||
Severity = 'Error', 'Warning', 'Information'
|
||||
|
||||
IncludeRules = @(
|
||||
'PSAlignAssignmentStatement',
|
||||
'PSAvoidAssignmentToAutomaticVariable',
|
||||
'AvoidDefaultValueForMandatoryParameter',
|
||||
'PSAvoidDefaultValueSwitchParameter',
|
||||
'PSAvoidGlobalAliases',
|
||||
'ÜSAvoidGlobalFunctions',
|
||||
'PSAvoidGlobalVars',
|
||||
'PSAvoidInvokingEmptyMembers',
|
||||
'PSAvoidLongLines',
|
||||
'PSAvoidNullOrEmptyHelpMessageAttribute',
|
||||
'PSAvoidOverwritingBuiltInCmdlets',
|
||||
'PSAvoidShouldContinueWithoutForce',
|
||||
'PSAvoidTrailingWhitespace',
|
||||
'PSAvoidUsingCmdletAliases',
|
||||
'PSAvoidUsingComputerNameHardcoded',
|
||||
'PSAvoidUsingConvertToSecureStringWithPlainText',
|
||||
'PSAvoidUsingDeprecatedManifestFields',
|
||||
'PSAvoidUsingDoubleQuotesForConstantString',
|
||||
'PSAvoidUsingEmptyCatchBlock',
|
||||
'PSAvoidUsingInvokeExpression',
|
||||
'PSAvoidUsingPlainTextForPassword',
|
||||
'PSAvoidUsingPositionalParameters',
|
||||
'PSAvoidUsingUsernameAndPasswordParams',
|
||||
'PSAvoidUsingWMICmdlet',
|
||||
'PSAvoidUsingWriteHost',
|
||||
'PSMisleadingBacktick',
|
||||
'PSMissingModuleManifestField',
|
||||
'PSPlaceCloseBrace',
|
||||
'PSPlaceOpenBrace',
|
||||
'PSPossibleIncorrectComparisonWithNull',
|
||||
'PSPossibleIncorrectUsageOfAssignmentOperator',
|
||||
'PSPossibleIncorrectUsageOfRedirectionOperator',
|
||||
'PSProvideCommentHelp',
|
||||
'PSReservedCmdletChar',
|
||||
'PSReservedParams',
|
||||
'PSReviewUnusedParameter',
|
||||
'PSShouldProcess',
|
||||
'PSUseApprovedVerbs',
|
||||
'PSUseBOMForUnicodeEncodedFile',
|
||||
'PSUseCmdletCorrectly',
|
||||
'PSUseCompatibleCmdlets',
|
||||
#'PSUseCompatibleCommands',
|
||||
'PSUseCompatibleSyntax',
|
||||
#'PSUseCompatibleTypes',
|
||||
'PSUseConsistentIndentation',
|
||||
'PSUseConsistentWhitespace',
|
||||
'PSUseCorrectCasing',
|
||||
'PSUseDeclaredVarsMoreThanAssignments',
|
||||
'PSUseLiteralInitializerForHashtable',
|
||||
'PSUseOutputTypeCorrectly',
|
||||
'PSUsePSCredentialType',
|
||||
'PSUseProcessBlockForPipelineCommand',
|
||||
'PSUseShouldProcessForStateChangingFunctions',
|
||||
'PSUseSingularNouns',
|
||||
'PSUseSupportsShouldProcess',
|
||||
'PSUseToExportFieldsInManifest',
|
||||
'PSUseUTF8EncodingForHelpFile',
|
||||
'PSUseUsingScopeModifierInNewRunspaces'
|
||||
)
|
||||
|
||||
Rules = @{
|
||||
|
||||
PSAvoidLongLines = @{
|
||||
Enable = $true
|
||||
MaximumLineLength = 116
|
||||
}
|
||||
|
||||
PSPlaceOpenBrace = @{
|
||||
Enable = $true
|
||||
OnSameLine = $true
|
||||
NewLineAfter = $true
|
||||
IgnoreOneLineBlock = $true
|
||||
}
|
||||
|
||||
PSPlaceCloseBrace = @{
|
||||
Enable = $true
|
||||
NewLineAfter = $true
|
||||
IgnoreOneLineBlock = $true
|
||||
NoEmptyLineBefore = $false
|
||||
}
|
||||
|
||||
PSProvideCommentHelp = @{
|
||||
Enable = $true
|
||||
ExportedOnly = $false
|
||||
BlockComment = $true
|
||||
VSCodeSnippetCorrection = $false
|
||||
Placement = "begin"
|
||||
}
|
||||
|
||||
PSUseCompatibleCmdlets = @{
|
||||
compatibility = @(
|
||||
"desktop-5.1.14393.206-windows",
|
||||
"core-6.1.0-windows"
|
||||
)
|
||||
}
|
||||
|
||||
PSUseCompatibleSyntax = @{
|
||||
Enable = $true
|
||||
TargetVersions = @(
|
||||
"7.0",
|
||||
"5.1"
|
||||
)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
PSAlignAssignmentStatement = @{
|
||||
Enable = $true
|
||||
CheckHashtable = $false
|
||||
}
|
||||
|
||||
PSUseCorrectCasing = @{
|
||||
Enable = $true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user