-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HQRM with preview DscResource.ScriptAnalyzer Rules (#134)
- Loading branch information
1 parent
eba544d
commit 8b170c8
Showing
6 changed files
with
108 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,73 @@ | ||
@{ | ||
CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules' | ||
CustomRulePath = @( | ||
'.\output\RequiredModules\DscResource.AnalyzerRules' | ||
'.\output\RequiredModules\Indented.ScriptAnalyzerRules' | ||
) | ||
IncludeDefaultRules = $true | ||
IncludeRules = @( | ||
IncludeRules = @( | ||
# DSC Resource Kit style guideline rules. | ||
'PSAvoidDefaultValueForMandatoryParameter', | ||
'PSAvoidDefaultValueSwitchParameter', | ||
'PSAvoidInvokingEmptyMembers', | ||
'PSAvoidNullOrEmptyHelpMessageAttribute', | ||
'PSAvoidUsingCmdletAliases', | ||
'PSAvoidUsingComputerNameHardcoded', | ||
'PSAvoidUsingDeprecatedManifestFields', | ||
'PSAvoidUsingEmptyCatchBlock', | ||
'PSAvoidUsingInvokeExpression', | ||
'PSAvoidUsingPositionalParameters', | ||
'PSAvoidShouldContinueWithoutForce', | ||
'PSAvoidUsingWMICmdlet', | ||
'PSAvoidUsingWriteHost', | ||
'PSDSCReturnCorrectTypesForDSCFunctions', | ||
'PSDSCStandardDSCFunctionsInResource', | ||
'PSDSCUseIdenticalMandatoryParametersForDSC', | ||
'PSDSCUseIdenticalParametersForDSC', | ||
'PSMisleadingBacktick', | ||
'PSMissingModuleManifestField', | ||
'PSPossibleIncorrectComparisonWithNull', | ||
'PSProvideCommentHelp', | ||
'PSReservedCmdletChar', | ||
'PSReservedParams', | ||
'PSUseApprovedVerbs', | ||
'PSUseCmdletCorrectly', | ||
'PSUseOutputTypeCorrectly', | ||
'PSAvoidGlobalVars', | ||
'PSAvoidUsingConvertToSecureStringWithPlainText', | ||
'PSAvoidUsingPlainTextForPassword', | ||
'PSAvoidUsingUsernameAndPasswordParams', | ||
'PSDSCUseVerboseMessageInDSCResource', | ||
'PSShouldProcess', | ||
'PSUseDeclaredVarsMoreThanAssignments', | ||
'PSUsePSCredentialType', | ||
'PSAvoidDefaultValueForMandatoryParameter' | ||
'PSAvoidDefaultValueSwitchParameter' | ||
'PSAvoidInvokingEmptyMembers' | ||
'PSAvoidNullOrEmptyHelpMessageAttribute' | ||
'PSAvoidUsingCmdletAliases' | ||
'PSAvoidUsingComputerNameHardcoded' | ||
'PSAvoidUsingDeprecatedManifestFields' | ||
'PSAvoidUsingEmptyCatchBlock' | ||
'PSAvoidUsingInvokeExpression' | ||
'PSAvoidUsingPositionalParameters' | ||
'PSAvoidShouldContinueWithoutForce' | ||
'PSAvoidUsingWMICmdlet' | ||
'PSAvoidUsingWriteHost' | ||
'PSDSCReturnCorrectTypesForDSCFunctions' | ||
'PSDSCStandardDSCFunctionsInResource' | ||
'PSDSCUseIdenticalMandatoryParametersForDSC' | ||
'PSDSCUseIdenticalParametersForDSC' | ||
'PSMisleadingBacktick' | ||
'PSMissingModuleManifestField' | ||
'PSPossibleIncorrectComparisonWithNull' | ||
'PSProvideCommentHelp' | ||
'PSReservedCmdletChar' | ||
'PSReservedParams' | ||
'PSUseApprovedVerbs' | ||
'PSUseCmdletCorrectly' | ||
'PSUseOutputTypeCorrectly' | ||
'PSAvoidGlobalVars' | ||
'PSAvoidUsingConvertToSecureStringWithPlainText' | ||
'PSAvoidUsingPlainTextForPassword' | ||
'PSAvoidUsingUsernameAndPasswordParams' | ||
'PSDSCUseVerboseMessageInDSCResource' | ||
'PSShouldProcess' | ||
'PSUseDeclaredVarsMoreThanAssignments' | ||
'PSUsePSCredentialType' | ||
|
||
# Additional rules from the module ScriptAnalyzer | ||
'PSUseConsistentWhitespace' | ||
'UseCorrectCasing' | ||
'PSPlaceOpenBrace' | ||
'PSPlaceCloseBrace' | ||
'AlignAssignmentStatement' | ||
'AvoidUsingDoubleQuotesForConstantString' | ||
'UseShouldProcessForStateChangingFunctions' | ||
|
||
# Rules from the modules DscResource.AnalyzerRules | ||
'Measure-*' | ||
|
||
# Rules from the module Indented.ScriptAnalyzerRules | ||
'AvoidCreatingObjectsFromAnEmptyString' | ||
'AvoidDashCharacters' | ||
'AvoidEmptyNamedBlocks' | ||
'AvoidFilter' | ||
'AvoidHelpMessage' | ||
'AvoidNestedFunctions' | ||
'AvoidNewObjectToCreatePSObject' | ||
'AvoidParameterAttributeDefaultValues' | ||
'AvoidProcessWithoutPipeline' | ||
'AvoidSmartQuotes' | ||
'AvoidThrowOutsideOfTry' | ||
'AvoidWriteErrorStop' | ||
'AvoidWriteOutput' | ||
'UseSyntacticallyCorrectExamples' | ||
) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters