-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
11 changed files
with
1,552 additions
and
433 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,115 @@ | ||
@{ | ||
CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules' | ||
includeDefaultRules = $true | ||
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', | ||
CustomRulePath = @( | ||
'./output/RequiredModules/DscResource.AnalyzerRules' | ||
'./output/RequiredModules/Indented.ScriptAnalyzerRules' | ||
) | ||
IncludeDefaultRules = $true | ||
IncludeRules = @( | ||
# DSC Community style guideline rules from the module ScriptAnalyzer. | ||
'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' | ||
) | ||
|
||
<# | ||
The following types are not rules but parse errors reported by PSScriptAnalyzer | ||
so they cannot be ecluded. They need to be filtered out from the result of | ||
Invoke-ScriptAnalyzer. | ||
TypeNotFound - Because classes in the project cannot be found unless built. | ||
RequiresModuleInvalid - Because 'using module' in prefix.ps1 cannot be resolved as source file. | ||
#> | ||
ExcludeRules = @() | ||
|
||
Rules = @{ | ||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckOpenBrace = $true | ||
CheckInnerBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $false | ||
CheckSeparator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $true | ||
CheckParameter = $false | ||
} | ||
|
||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
OnSameLine = $false | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $false | ||
} | ||
|
||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
NoEmptyLineBefore = $true | ||
IgnoreOneLineBlock = $false | ||
NewLineAfter = $true | ||
} | ||
|
||
PSAlignAssignmentStatement = @{ | ||
Enable = $true | ||
CheckHashtable = $true | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
@{ | ||
PSDependOptions = @{ | ||
PSDependOptions = @{ | ||
AddToPath = $true | ||
Target = 'output\RequiredModules' | ||
Parameters = @{ | ||
Repository = '' | ||
} | ||
} | ||
|
||
InvokeBuild = 'latest' | ||
PSScriptAnalyzer = 'latest' | ||
Pester = '4.10.1' | ||
Plaster = 'latest' | ||
ModuleBuilder = 'latest' | ||
ChangelogManagement = 'latest' | ||
Sampler = 'latest' | ||
'Sampler.GitHubTasks' = 'latest' | ||
MarkdownLinkCheck = 'latest' | ||
'DscResource.Test' = 'latest' | ||
'DscResource.AnalyzerRules' = 'latest' | ||
'DscResource.DocGenerator' = 'latest' | ||
'DscResource.Common' = 'latest' | ||
xDscResourceDesigner = 'latest' | ||
InvokeBuild = 'latest' | ||
PSScriptAnalyzer = 'latest' | ||
Pester = '4.10.1' | ||
Plaster = 'latest' | ||
ModuleBuilder = 'latest' | ||
ChangelogManagement = 'latest' | ||
Sampler = 'latest' | ||
'Sampler.GitHubTasks' = 'latest' | ||
MarkdownLinkCheck = 'latest' | ||
'DscResource.Test' = 'latest' | ||
xDscResourceDesigner = 'latest' | ||
|
||
# Build dependencies needed for using the module | ||
'DscResource.Common' = 'latest' | ||
|
||
# Analyzer rules | ||
'DscResource.AnalyzerRules' = 'latest' | ||
'Indented.ScriptAnalyzerRules' = 'latest' | ||
|
||
# Prerequisite modules for documentation. | ||
'DscResource.DocGenerator' = 'latest' | ||
PlatyPS = 'latest' | ||
} |
Oops, something went wrong.