Skip to content

Commit 87a3571

Browse files
authored
Update module files (#286)
1 parent fe35edd commit 87a3571

13 files changed

Lines changed: 1128 additions & 276 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
- [ ] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
4242
Entry should say what was changed and how that affects users (if applicable), and
4343
reference the issue being resolved (if applicable).
44-
- [ ] Resource documentation updated in the resource's README.md.
45-
- [ ] Resource parameter descriptions updated in schema.mof.
46-
- [ ] Comment-based help updated, including parameter descriptions.
44+
- [ ] Resource documentation added/updated in README.md.
45+
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof and comment-based
46+
help.
47+
- [ ] Comment-based help added/updated.
4748
- [ ] Localization strings added/updated in all localization files as appropriate.
4849
- [ ] Examples appropriately added/updated.
4950
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ output/
99
*.suo
1010
*.user
1111
*.coverage
12-
.vscode
1312
.vs
1413
.psproj
1514
.sln

.vscode/analyzersettings.psd1

Lines changed: 108 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,115 @@
11
@{
2-
CustomRulePath = '.\output\RequiredModules\DscResource.AnalyzerRules'
2+
CustomRulePath = @(
3+
'./output/RequiredModules/DscResource.AnalyzerRules'
4+
'./output/RequiredModules/Indented.ScriptAnalyzerRules'
5+
)
36
IncludeDefaultRules = $true
4-
IncludeRules = @(
5-
# DSC Resource Kit style guideline rules.
6-
'PSAvoidDefaultValueForMandatoryParameter',
7-
'PSAvoidDefaultValueSwitchParameter',
8-
'PSAvoidInvokingEmptyMembers',
9-
'PSAvoidNullOrEmptyHelpMessageAttribute',
10-
'PSAvoidUsingCmdletAliases',
11-
'PSAvoidUsingComputerNameHardcoded',
12-
'PSAvoidUsingDeprecatedManifestFields',
13-
'PSAvoidUsingEmptyCatchBlock',
14-
'PSAvoidUsingInvokeExpression',
15-
'PSAvoidUsingPositionalParameters',
16-
'PSAvoidShouldContinueWithoutForce',
17-
'PSAvoidUsingWMICmdlet',
18-
'PSAvoidUsingWriteHost',
19-
'PSDSCReturnCorrectTypesForDSCFunctions',
20-
'PSDSCStandardDSCFunctionsInResource',
21-
'PSDSCUseIdenticalMandatoryParametersForDSC',
22-
'PSDSCUseIdenticalParametersForDSC',
23-
'PSMisleadingBacktick',
24-
'PSMissingModuleManifestField',
25-
'PSPossibleIncorrectComparisonWithNull',
26-
'PSProvideCommentHelp',
27-
'PSReservedCmdletChar',
28-
'PSReservedParams',
29-
'PSUseApprovedVerbs',
30-
'PSUseCmdletCorrectly',
31-
'PSUseOutputTypeCorrectly',
32-
'PSAvoidGlobalVars',
33-
'PSAvoidUsingConvertToSecureStringWithPlainText',
34-
'PSAvoidUsingPlainTextForPassword',
35-
'PSAvoidUsingUsernameAndPasswordParams',
36-
'PSDSCUseVerboseMessageInDSCResource',
37-
'PSShouldProcess',
38-
'PSUseDeclaredVarsMoreThanAssignments',
39-
'PSUsePSCredentialType',
7+
IncludeRules = @(
8+
# DSC Community style guideline rules from the module ScriptAnalyzer.
9+
'PSAvoidDefaultValueForMandatoryParameter'
10+
'PSAvoidDefaultValueSwitchParameter'
11+
'PSAvoidInvokingEmptyMembers'
12+
'PSAvoidNullOrEmptyHelpMessageAttribute'
13+
'PSAvoidUsingCmdletAliases'
14+
'PSAvoidUsingComputerNameHardcoded'
15+
'PSAvoidUsingDeprecatedManifestFields'
16+
'PSAvoidUsingEmptyCatchBlock'
17+
'PSAvoidUsingInvokeExpression'
18+
'PSAvoidUsingPositionalParameters'
19+
'PSAvoidShouldContinueWithoutForce'
20+
'PSAvoidUsingWMICmdlet'
21+
'PSAvoidUsingWriteHost'
22+
'PSDSCReturnCorrectTypesForDSCFunctions'
23+
'PSDSCStandardDSCFunctionsInResource'
24+
'PSDSCUseIdenticalMandatoryParametersForDSC'
25+
'PSDSCUseIdenticalParametersForDSC'
26+
'PSMisleadingBacktick'
27+
'PSMissingModuleManifestField'
28+
'PSPossibleIncorrectComparisonWithNull'
29+
'PSProvideCommentHelp'
30+
'PSReservedCmdletChar'
31+
'PSReservedParams'
32+
'PSUseApprovedVerbs'
33+
'PSUseCmdletCorrectly'
34+
'PSUseOutputTypeCorrectly'
35+
'PSAvoidGlobalVars'
36+
'PSAvoidUsingConvertToSecureStringWithPlainText'
37+
'PSAvoidUsingPlainTextForPassword'
38+
'PSAvoidUsingUsernameAndPasswordParams'
39+
'PSDSCUseVerboseMessageInDSCResource'
40+
'PSShouldProcess'
41+
'PSUseDeclaredVarsMoreThanAssignments'
42+
'PSUsePSCredentialType'
43+
44+
# Additional rules from the module ScriptAnalyzer
45+
'PSUseConsistentWhitespace'
46+
'UseCorrectCasing'
47+
'PSPlaceOpenBrace'
48+
'PSPlaceCloseBrace'
49+
'AlignAssignmentStatement'
50+
'AvoidUsingDoubleQuotesForConstantString'
51+
'UseShouldProcessForStateChangingFunctions'
4052

53+
# Rules from the modules DscResource.AnalyzerRules
4154
'Measure-*'
55+
56+
# Rules from the module Indented.ScriptAnalyzerRules
57+
'AvoidCreatingObjectsFromAnEmptyString'
58+
'AvoidDashCharacters'
59+
'AvoidEmptyNamedBlocks'
60+
'AvoidFilter'
61+
'AvoidHelpMessage'
62+
'AvoidNestedFunctions'
63+
'AvoidNewObjectToCreatePSObject'
64+
'AvoidParameterAttributeDefaultValues'
65+
'AvoidProcessWithoutPipeline'
66+
'AvoidSmartQuotes'
67+
'AvoidThrowOutsideOfTry'
68+
'AvoidWriteErrorStop'
69+
'AvoidWriteOutput'
70+
'UseSyntacticallyCorrectExamples'
4271
)
4372

73+
<#
74+
The following types are not rules but parse errors reported by PSScriptAnalyzer
75+
so they cannot be ecluded. They need to be filtered out from the result of
76+
Invoke-ScriptAnalyzer.
77+
78+
TypeNotFound - Because classes in the project cannot be found unless built.
79+
RequiresModuleInvalid - Because 'using module' in prefix.ps1 cannot be resolved as source file.
80+
#>
81+
ExcludeRules = @()
82+
83+
Rules = @{
84+
PSUseConsistentWhitespace = @{
85+
Enable = $true
86+
CheckOpenBrace = $true
87+
CheckInnerBrace = $true
88+
CheckOpenParen = $true
89+
CheckOperator = $false
90+
CheckSeparator = $true
91+
CheckPipe = $true
92+
CheckPipeForRedundantWhitespace = $true
93+
CheckParameter = $false
94+
}
95+
96+
PSPlaceOpenBrace = @{
97+
Enable = $true
98+
OnSameLine = $false
99+
NewLineAfter = $true
100+
IgnoreOneLineBlock = $false
101+
}
102+
103+
PSPlaceCloseBrace = @{
104+
Enable = $true
105+
NoEmptyLineBefore = $true
106+
IgnoreOneLineBlock = $false
107+
NewLineAfter = $true
108+
}
109+
110+
PSAlignAssignmentStatement = @{
111+
Enable = $true
112+
CheckHashtable = $true
113+
}
114+
}
44115
}

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"davidanson.vscode-markdownlint",
4+
"ms-vscode.powershell",
5+
"streetsidesoftware.code-spell-checker",
6+
"redhat.vscode-yaml"
7+
]
8+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"files.associations": {
2020
"*.ps1xml": "xml"
2121
},
22+
"cSpell.dictionaries": [
23+
"powershell"
24+
],
2225
"cSpell.words": [
2326
"COMPANYNAME",
2427
"ICONURI",
@@ -34,6 +37,9 @@
3437
"pscmdlet",
3538
"steppable"
3639
],
40+
"cSpell.ignorePaths": [
41+
".git"
42+
],
3743
"[markdown]": {
3844
"files.trimTrailingWhitespace": false,
3945
"files.encoding": "utf8"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
1818
- URLs in module manifest now points to the renamed repository.
1919
- Fixed build pipeline to use GitVersion v5.
2020
- Switch build pipeline to use `windows-latest` as the build agent.
21+
- Update latest module files from Sampler.
22+
- Use matrix pipeline strategy.
2123

2224
## [2.1.0] - 2022-06-19
2325

RequiredModules.psd1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@
1616
Sampler = 'latest'
1717
'Sampler.GitHubTasks' = 'latest'
1818
MarkdownLinkCheck = 'latest'
19-
'DscResource.Common' = 'latest'
2019
'DscResource.Test' = 'latest'
21-
'DscResource.AnalyzerRules' = 'latest'
2220
xDscResourceDesigner = 'latest'
23-
'DscResource.DocGenerator' = 'latest'
21+
22+
# Build dependencies needed for using the module
23+
'DscResource.Common' = 'latest'
24+
25+
# Analyzer rules
26+
'DscResource.AnalyzerRules' = 'latest'
27+
'Indented.ScriptAnalyzerRules' = 'latest'
28+
29+
# Prerequisite modules for documentation.
30+
'DscResource.DocGenerator' = 'latest'
31+
PlatyPS = 'latest'
2432
}

0 commit comments

Comments
 (0)