Skip to content

Commit

Permalink
First version (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Dec 31, 2022
1 parent 07cbc30 commit 0506f25
Show file tree
Hide file tree
Showing 48 changed files with 5,376 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
* text eol=crlf

# Ensure any exe files are treated as binary
*.exe binary
*.jpg binary
*.xl* binary
*.pfx binary
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/General.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: General question or documentation update
about: If you have a general question or documentation update suggestion around the module.
---
<!--
Your feedback and support is greatly appreciated, thanks for contributing!
-->
101 changes: 101 additions & 0 deletions .github/ISSUE_TEMPLATE/Problem_with_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Problem with the module
description: If you have a problem using this module, want to report a bug, or suggest an enhancement to this module.
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
TITLE: Please be descriptive not sensationalist.
Your feedback and support is greatly appreciated, thanks for contributing!
Please provide information regarding your issue under each section below.
**Write N/A in sections that do not apply, or if the information is not available.**
- type: textarea
id: description
attributes:
label: Problem description
description: Details of the scenario you tried and the problem that is occurring, or the enhancement you are suggesting.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Verbose logs
description: |
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._
placeholder: |
Paste verbose logs here
render: text
validations:
required: true
- type: textarea
id: reproducible
attributes:
label: How to reproduce
description: Provide the steps to reproduce the problem.
validations:
required: true
- type: textarea
id: expectedBehavior
attributes:
label: Expected behavior
description: Describe what you expected to happen.
validations:
required: true
- type: textarea
id: currentBehavior
attributes:
label: Current behavior
description: Describe what actually happens.
validations:
required: true
- type: textarea
id: suggestedSolution
attributes:
label: Suggested solution
description: Do you have any suggestions how to solve the issue?
validations:
required: true
- type: textarea
id: targetNodeOS
attributes:
label: Operating system the target node is running
description: |
Please provide as much as possible about the node running DscResource.Common. _Will be automatically formatted as plain text._
To help with this information:
- 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`
- 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')`
placeholder: |
Add operating system information here
render: text
validations:
required: true
- type: textarea
id: targetNodePS
attributes:
label: PowerShell version and build the target node is running
description: |
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._
To help with this information, please run this command: `$PSVersionTable`
placeholder: |
Add PowerShell information here
render: text
validations:
required: true
- type: textarea
id: moduleVersion
attributes:
label: Module version used
description: |
Please provide the version of the DscResource.Common module that was used. _Will be automatically formatted as plain text._
To help with this information, please run this command: `Get-Module -Name 'DscResource.Common' -ListAvailable | ft Name,Version,Path`
placeholder: |
Add module information here
render: text
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: "Virtual PowerShell User Group #DSC channel"
url: https://dsccommunity.org/community/contact/
about: "To talk to the community and maintainers of DSC Community, please visit the #DSC channel."
46 changes: 46 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
Thanks for submitting a Pull Request (PR) to this project.
Your contribution to this project is greatly appreciated!
Please make sure the PR title is short but a descriptive
summary of the PR,
e.g "String arrays where not allowed if it had un unsupported value map".
You may remove this comment block, and the other comment blocks,
but please keep the headers and the task list.
-->
#### Pull Request (PR) description
<!--
Replace this comment block with a description of your PR.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment block with the list of issues or n/a.
Use format:
- Fixes #123
- Fixes #124
-->

#### Task list
<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your pull
request (PR). For those task that don't apply to you pull request (PR),
leave those as is.
-->
- [ ] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
- [ ] Documentation added/updated in README.md.
- [ ] Comment-based help added/updated for all new/changed functions.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] Integration tests added/updated (where possible). See
[DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
25 changes: 25 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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.'
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.'
days-before-issue-stale: 30
days-before-issue-close: 40
exempt-issue-labels: 'bug,enhancement,tests,documentation,resource proposal,on hold,resolved'
stale-issue-label: 'stale'
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.'
days-before-pr-stale: 14
days-before-pr-close: -1
exempt-pr-labels: 'needs review,on hold,ready for merge'
stale-pr-label: 'abandoned'
remove-stale-when-updated: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
.vs
output/
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD029": {
"style": "one"
},
"MD013": true,
"MD024": false,
"MD034": false,
"no-hard-tabs": true
}
110 changes: 110 additions & 0 deletions .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
@{
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 and SqlServerDsc.AnalyzerRules
'Measure-*'

# Rules from the module Indented.ScriptAnalyzerRules
'AvoidCreatingObjectsFromAnEmptyString'
'AvoidDashCharacters'
'AvoidEmptyNamedBlocks'
'AvoidFilter'
'AvoidHelpMessage'
'AvoidNestedFunctions'
'AvoidNewObjectToCreatePSObject'
'AvoidParameterAttributeDefaultValues'
'AvoidProcessWithoutPipeline'
'AvoidSmartQuotes'
'AvoidThrowOutsideOfTry'
'AvoidWriteErrorStop'
'AvoidWriteOutput'
'UseSyntacticallyCorrectExamples'
)

# TODO: This is not excluded correctly, see test QA/ScriptAnalyzer.Tests.ps1 for more information.
ExcludeRules = @(
'TypeNotFound'
)

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
}
}
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"pspester.pester-test",
"ms-vscode.powershell",
"streetsidesoftware.code-spell-checker"
]
}
48 changes: 48 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

{
"powershell.codeFormatting.openBraceOnSameLine": false,
"powershell.codeFormatting.newLineAfterOpenBrace": true,
"powershell.codeFormatting.newLineAfterCloseBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
"powershell.codeFormatting.preset": "Custom",
"powershell.codeFormatting.alignPropertyValuePairs": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.developer.bundledModulesPath": "${cwd}/output/RequiredModules",
"powershell.scriptAnalysis.settingsPath": ".vscode/analyzersettings.psd1",
"powershell.scriptAnalysis.enable": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"files.associations": {
"*.ps1xml": "xml"
},
"cSpell.dictionaries": [
"powershell"
],
"cSpell.words": [
],
"cSpell.ignorePaths": [
".git"
],
"cSpell.ignoreRegExpList": [
],
"[markdown]": {
"files.trimTrailingWhitespace": true,
"files.encoding": "utf8"
},
"powershell.pester.useLegacyCodeLens": false,
"pester.testFilePath": [
"[tT]ests/[qQ][aA]/*.[tT]ests.[pP][sS]1",
"[tT]ests/[uU]nit/**/*.[tT]ests.[pP][sS]1",
"[tT]ests/[uU]nit/*.[tT]ests.[pP][sS]1"
],
"pester.runTestsInNewProcess": false,
"pester.pesterModulePath": "./output/RequiredModules/Pester",
"powershell.pester.codeLens": true,
"pester.suppressCodeLensNotice": true
}
Loading

0 comments on commit 0506f25

Please sign in to comment.