-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
65 changed files
with
11,887 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Needed for publishing of examples, build worker defaults to core.autocrlf=input. | ||
* text eol=autocrlf | ||
|
||
*.mof text eol=crlf | ||
*.sh text eol=lf | ||
*.svg eol=lf | ||
|
||
# Ensure any exe files are treated as binary | ||
*.exe binary | ||
*.jpg binary | ||
*.xl* binary | ||
*.pfx binary | ||
*.png binary | ||
*.dll binary | ||
*.so binary |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
output/ | ||
|
||
**.bak | ||
*.local.* | ||
!**/README.md | ||
.kitchen/ | ||
|
||
*.nupkg | ||
*.suo | ||
*.user | ||
*.coverage | ||
.vs | ||
.psproj | ||
.sln | ||
markdownissues.txt | ||
node_modules | ||
package-lock.json |
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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
@{ | ||
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 excluded. 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
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" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
{ | ||
"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": [ | ||
"COMPANYNAME", | ||
"ICONURI", | ||
"LICENSEURI", | ||
"PROJECTURI", | ||
"RELEASENOTES", | ||
"PSDSC" | ||
], | ||
"cSpell.ignorePaths": [ | ||
".git" | ||
], | ||
"cSpell.ignoreRegExpList": [ | ||
"/HKCU:/g", | ||
"/analyzersettings\\.psd1/g" | ||
], | ||
"[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, | ||
"markdownlint.ignore": [ | ||
".github/CODEOWNERS" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ | ||
"version": "2.0.0", | ||
"_runner": "terminal", | ||
"windows": { | ||
"options": { | ||
"shell": { | ||
"executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", | ||
"args": [ | ||
"-NoProfile", | ||
"-ExecutionPolicy", | ||
"Bypass", | ||
"-Command" | ||
] | ||
} | ||
} | ||
}, | ||
"linux": { | ||
"options": { | ||
"shell": { | ||
"executable": "/usr/bin/pwsh", | ||
"args": [ | ||
"-NoProfile", | ||
"-Command" | ||
] | ||
} | ||
} | ||
}, | ||
"osx": { | ||
"options": { | ||
"shell": { | ||
"executable": "/usr/local/bin/pwsh", | ||
"args": [ | ||
"-NoProfile", | ||
"-Command" | ||
] | ||
} | ||
} | ||
}, | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"type": "shell", | ||
"command": "&${cwd}/build.ps1", | ||
"args": [], | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": true, | ||
"panel": "new", | ||
"clear": false | ||
}, | ||
"runOptions": { | ||
"runOn": "default" | ||
}, | ||
"problemMatcher": [ | ||
{ | ||
"owner": "powershell", | ||
"fileLocation": [ | ||
"absolute" | ||
], | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$", | ||
"message": 1 | ||
}, | ||
{ | ||
"regexp": "(.*)", | ||
"code": 1 | ||
}, | ||
{ | ||
"regexp": "" | ||
}, | ||
{ | ||
"regexp": "^.*,\\s*(.*):\\s*line\\s*(\\d+).*", | ||
"file": 1, | ||
"line": 2 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "test", | ||
"type": "shell", | ||
"command": "&${cwd}/build.ps1", | ||
"args": ["-AutoRestore","-Tasks","test"], | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": true, | ||
"panel": "dedicated", | ||
"showReuseMessage": true, | ||
"clear": false | ||
}, | ||
"problemMatcher": [ | ||
{ | ||
"owner": "powershell", | ||
"fileLocation": [ | ||
"absolute" | ||
], | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$", | ||
"message": 1 | ||
}, | ||
{ | ||
"regexp": "(.*)", | ||
"code": 1 | ||
}, | ||
{ | ||
"regexp": "" | ||
}, | ||
{ | ||
"regexp": "^.*,\\s*(.*):\\s*line\\s*(\\d+).*", | ||
"file": 1, | ||
"line": 2 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Changelog for PesterConverter | ||
|
||
The format is based on and uses the types of changes according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- Public commands: | ||
- `Convert-PesterSyntx` |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Code of Conduct | ||
|
||
This project has adopted the [DSC Community Code of Conduct](https://dsccommunity.org/code_of_conduct). |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
mode: ContinuousDelivery | ||
next-version: 0.0.1 | ||
major-version-bump-message: '(breaking\schange|breaking)\b' | ||
minor-version-bump-message: '(adds?|minor)\b' | ||
patch-version-bump-message: '\s?(fix|patch)' | ||
no-bump-message: '\+semver:\s?(none|skip)' | ||
assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}' | ||
branches: | ||
master: | ||
tag: preview | ||
regex: ^main$ | ||
pull-request: | ||
tag: PR | ||
feature: | ||
tag: useBranchName | ||
increment: Minor | ||
regex: f(eature(s)?)?[\/-] | ||
source-branches: ['master'] | ||
hotfix: | ||
tag: fix | ||
increment: Patch | ||
regex: (hot)?fix(es)?[\/-] | ||
source-branches: ['master'] | ||
|
||
ignore: | ||
sha: [] | ||
merge-message-formats: {} |
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
Oops, something went wrong.