-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e18fd3
commit 60f9961
Showing
35 changed files
with
6,455 additions
and
3,422 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,10 +1,3 @@ | ||
*.suo | ||
*.user | ||
*.coverage | ||
.vs | ||
.vscode | ||
.psproj | ||
.sln | ||
markdownissues.txt | ||
TestResults.xml | ||
output/ |
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,43 +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,51 @@ | ||
@{ | ||
PSDependOptions = @{ | ||
PSDependOptions = @{ | ||
AddToPath = $true | ||
Target = 'output\RequiredModules' | ||
Parameters = @{ | ||
Repository = '' | ||
Repository = 'PSGallery' | ||
} | ||
} | ||
|
||
InvokeBuild = 'latest' | ||
PSScriptAnalyzer = 'latest' | ||
ConvertToSARIF = 'latest' # cSpell: disable-line | ||
|
||
<# | ||
If preview release of Pester prevents release we should temporary shift | ||
back to stable. | ||
#> | ||
Pester = @{ | ||
Version = 'latest' | ||
Parameters = @{ | ||
AllowPrerelease = $true | ||
} | ||
} | ||
|
||
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' | ||
|
||
# Build dependencies needed for using the module | ||
'DscResource.Base' = 'latest' | ||
'DscResource.Common' = 'latest' | ||
|
||
# Analyzer rules | ||
'DscResource.AnalyzerRules' = 'latest' | ||
'Indented.ScriptAnalyzerRules' = 'latest' | ||
|
||
# Prerequisite modules for documentation. | ||
#'DscResource.DocGenerator' = 'latest' | ||
'DscResource.DocGenerator' = @{ | ||
Version = 'latest' | ||
Parameters = @{ | ||
AllowPrerelease = $true | ||
} | ||
} | ||
PlatyPS = 'latest' | ||
} |
Oops, something went wrong.