Skip to content

Commit 0506f25

Browse files
authored
First version (#1)
1 parent 07cbc30 commit 0506f25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5376
-2
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
2+
* text eol=crlf
3+
4+
# Ensure any exe files are treated as binary
5+
*.exe binary
6+
*.jpg binary
7+
*.xl* binary
8+
*.pfx binary

.github/ISSUE_TEMPLATE/General.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: General question or documentation update
3+
about: If you have a general question or documentation update suggestion around the module.
4+
---
5+
<!--
6+
Your feedback and support is greatly appreciated, thanks for contributing!
7+
-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Problem with the module
2+
description: If you have a problem using this module, want to report a bug, or suggest an enhancement to this module.
3+
labels: []
4+
assignees: []
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
TITLE: Please be descriptive not sensationalist.
10+
11+
Your feedback and support is greatly appreciated, thanks for contributing!
12+
13+
Please provide information regarding your issue under each section below.
14+
**Write N/A in sections that do not apply, or if the information is not available.**
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Problem description
19+
description: Details of the scenario you tried and the problem that is occurring, or the enhancement you are suggesting.
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: logs
24+
attributes:
25+
label: Verbose logs
26+
description: |
27+
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._
28+
placeholder: |
29+
Paste verbose logs here
30+
render: text
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: reproducible
35+
attributes:
36+
label: How to reproduce
37+
description: Provide the steps to reproduce the problem.
38+
validations:
39+
required: true
40+
- type: textarea
41+
id: expectedBehavior
42+
attributes:
43+
label: Expected behavior
44+
description: Describe what you expected to happen.
45+
validations:
46+
required: true
47+
- type: textarea
48+
id: currentBehavior
49+
attributes:
50+
label: Current behavior
51+
description: Describe what actually happens.
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: suggestedSolution
56+
attributes:
57+
label: Suggested solution
58+
description: Do you have any suggestions how to solve the issue?
59+
validations:
60+
required: true
61+
- type: textarea
62+
id: targetNodeOS
63+
attributes:
64+
label: Operating system the target node is running
65+
description: |
66+
Please provide as much as possible about the node running DscResource.Common. _Will be automatically formatted as plain text._
67+
68+
To help with this information:
69+
- On a Linux distribution, please provide the distribution name, version, and release. The following command can help get this information: `cat /etc/*-release && cat /proc/version`
70+
- On a Windows OS please provide edition, version, build, and language. The following command can help get this information: `Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')`
71+
placeholder: |
72+
Add operating system information here
73+
render: text
74+
validations:
75+
required: true
76+
- type: textarea
77+
id: targetNodePS
78+
attributes:
79+
label: PowerShell version and build the target node is running
80+
description: |
81+
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._
82+
83+
To help with this information, please run this command: `$PSVersionTable`
84+
placeholder: |
85+
Add PowerShell information here
86+
render: text
87+
validations:
88+
required: true
89+
- type: textarea
90+
id: moduleVersion
91+
attributes:
92+
label: Module version used
93+
description: |
94+
Please provide the version of the DscResource.Common module that was used. _Will be automatically formatted as plain text._
95+
96+
To help with this information, please run this command: `Get-Module -Name 'DscResource.Common' -ListAvailable | ft Name,Version,Path`
97+
placeholder: |
98+
Add module information here
99+
render: text
100+
validations:
101+
required: true

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: "Virtual PowerShell User Group #DSC channel"
4+
url: https://dsccommunity.org/community/contact/
5+
about: "To talk to the community and maintainers of DSC Community, please visit the #DSC channel."

.github/PULL_REQUEST_TEMPLATE.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!--
2+
Thanks for submitting a Pull Request (PR) to this project.
3+
Your contribution to this project is greatly appreciated!
4+
5+
Please make sure the PR title is short but a descriptive
6+
summary of the PR,
7+
e.g "String arrays where not allowed if it had un unsupported value map".
8+
9+
You may remove this comment block, and the other comment blocks,
10+
but please keep the headers and the task list.
11+
-->
12+
#### Pull Request (PR) description
13+
<!--
14+
Replace this comment block with a description of your PR.
15+
-->
16+
17+
#### This Pull Request (PR) fixes the following issues
18+
<!--
19+
Replace this comment block with the list of issues or n/a.
20+
Use format:
21+
- Fixes #123
22+
- Fixes #124
23+
-->
24+
25+
#### Task list
26+
<!--
27+
To aid community reviewers in reviewing and merging your PR, please take
28+
the time to run through the below checklist and make sure your PR has
29+
everything updated as required.
30+
31+
Change to [x] for each task in the task list that applies to your pull
32+
request (PR). For those task that don't apply to you pull request (PR),
33+
leave those as is.
34+
-->
35+
- [ ] Added an entry to the change log under the Unreleased section of the
36+
file CHANGELOG.md. Entry should say what was changed and how that
37+
affects users (if applicable), and reference the issue being resolved
38+
(if applicable).
39+
- [ ] Documentation added/updated in README.md.
40+
- [ ] Comment-based help added/updated for all new/changed functions.
41+
- [ ] Localization strings added/updated in all localization files as appropriate.
42+
- [ ] Examples appropriately added/updated.
43+
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
44+
- [ ] Integration tests added/updated (where possible). See
45+
[DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
46+
- [ ] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).

.github/workflows/stale.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v6
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 40 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.'
15+
close-issue-message: 'This issue has been automatically closed because it is has not had activity from the community in the last 40 days. If this issue was wrongly closed, for a issue author please comment and re-open it, if you are not the issue author comment with a reason for it to be reopened and tag a maintainer in the comment.'
16+
days-before-issue-stale: 30
17+
days-before-issue-close: 40
18+
exempt-issue-labels: 'bug,enhancement,tests,documentation,resource proposal,on hold,resolved'
19+
stale-issue-label: 'stale'
20+
stale-pr-message: 'Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again.'
21+
days-before-pr-stale: 14
22+
days-before-pr-close: -1
23+
exempt-pr-labels: 'needs review,on hold,ready for merge'
24+
stale-pr-label: 'abandoned'
25+
remove-stale-when-updated: true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode
2+
.vs
3+
output/

.markdownlint.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"default": true,
3+
"MD029": {
4+
"style": "one"
5+
},
6+
"MD013": true,
7+
"MD024": false,
8+
"MD034": false,
9+
"no-hard-tabs": true
10+
}

.vscode/analyzersettings.psd1

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
@{
2+
CustomRulePath = @(
3+
'./output/RequiredModules/DscResource.AnalyzerRules'
4+
'./output/RequiredModules/Indented.ScriptAnalyzerRules'
5+
)
6+
IncludeDefaultRules = $true
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'
52+
53+
# Rules from the modules DscResource.AnalyzerRules and SqlServerDsc.AnalyzerRules
54+
'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'
71+
)
72+
73+
# TODO: This is not excluded correctly, see test QA/ScriptAnalyzer.Tests.ps1 for more information.
74+
ExcludeRules = @(
75+
'TypeNotFound'
76+
)
77+
78+
Rules = @{
79+
PSUseConsistentWhitespace = @{
80+
Enable = $true
81+
CheckOpenBrace = $true
82+
CheckInnerBrace = $true
83+
CheckOpenParen = $true
84+
CheckOperator = $false
85+
CheckSeparator = $true
86+
CheckPipe = $true
87+
CheckPipeForRedundantWhitespace = $true
88+
CheckParameter = $false
89+
}
90+
91+
PSPlaceOpenBrace = @{
92+
Enable = $true
93+
OnSameLine = $false
94+
NewLineAfter = $true
95+
IgnoreOneLineBlock = $false
96+
}
97+
98+
PSPlaceCloseBrace = @{
99+
Enable = $true
100+
NoEmptyLineBefore = $true
101+
IgnoreOneLineBlock = $false
102+
NewLineAfter = $true
103+
}
104+
105+
PSAlignAssignmentStatement = @{
106+
Enable = $true
107+
CheckHashtable = $true
108+
}
109+
}
110+
}

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"davidanson.vscode-markdownlint",
4+
"pspester.pester-test",
5+
"ms-vscode.powershell",
6+
"streetsidesoftware.code-spell-checker"
7+
]
8+
}

.vscode/settings.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
{
3+
"powershell.codeFormatting.openBraceOnSameLine": false,
4+
"powershell.codeFormatting.newLineAfterOpenBrace": true,
5+
"powershell.codeFormatting.newLineAfterCloseBrace": true,
6+
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
7+
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
8+
"powershell.codeFormatting.whitespaceAroundOperator": true,
9+
"powershell.codeFormatting.whitespaceAfterSeparator": true,
10+
"powershell.codeFormatting.ignoreOneLineBlock": false,
11+
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
12+
"powershell.codeFormatting.preset": "Custom",
13+
"powershell.codeFormatting.alignPropertyValuePairs": true,
14+
"powershell.codeFormatting.useConstantStrings": true,
15+
"powershell.developer.bundledModulesPath": "${cwd}/output/RequiredModules",
16+
"powershell.scriptAnalysis.settingsPath": ".vscode/analyzersettings.psd1",
17+
"powershell.scriptAnalysis.enable": true,
18+
"files.trimTrailingWhitespace": true,
19+
"files.trimFinalNewlines": true,
20+
"files.insertFinalNewline": true,
21+
"files.associations": {
22+
"*.ps1xml": "xml"
23+
},
24+
"cSpell.dictionaries": [
25+
"powershell"
26+
],
27+
"cSpell.words": [
28+
],
29+
"cSpell.ignorePaths": [
30+
".git"
31+
],
32+
"cSpell.ignoreRegExpList": [
33+
],
34+
"[markdown]": {
35+
"files.trimTrailingWhitespace": true,
36+
"files.encoding": "utf8"
37+
},
38+
"powershell.pester.useLegacyCodeLens": false,
39+
"pester.testFilePath": [
40+
"[tT]ests/[qQ][aA]/*.[tT]ests.[pP][sS]1",
41+
"[tT]ests/[uU]nit/**/*.[tT]ests.[pP][sS]1",
42+
"[tT]ests/[uU]nit/*.[tT]ests.[pP][sS]1"
43+
],
44+
"pester.runTestsInNewProcess": false,
45+
"pester.pesterModulePath": "./output/RequiredModules/Pester",
46+
"powershell.pester.codeLens": true,
47+
"pester.suppressCodeLensNotice": true
48+
}

0 commit comments

Comments
 (0)