Skip to content

Commit

Permalink
initiale version
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBn committed Oct 26, 2019
0 parents commit a9abda3
Show file tree
Hide file tree
Showing 22 changed files with 1,112 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve

---

**Prerequisites**

Put an X between the brackets on each line to confirm you have completed them:

- [ ] The issue is still present in the latest version of the module.
- [ ] The issue has not been previously reported.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots or Transcripts**
If applicable, add screenshots or PowerShell transcripts to help explain your problem. You can use ```Start-Transcript``` and ```Stop-Transcript``` to record the steps you have performed.

**System Details**

- Operating System: [Windows | Linux | MacOS]
- Operating System Version (Version and Build, eg Windows 10 Build 1709):
- PowerShell Version: [Use ```Get-Host```]
- Architecture for PowerShell Session: [64bit | 32bit]
- Is this system an Azure Automation Worker?: [No, Hybrid Worker, Azure Worker]
- Other loaded modules: [Include the output of ```Get-Module```]

**Additional context**
Add any other context about the problem here. Is there any other information like system configuration or data that might help us understand the problem.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Examples of how the solution would work**
Some simple PowerShell examples of how the solution would work.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,28 @@
### Requirements

* This template is required. Any request that does not include enough information may be closed at the maintainers' discretion.
* Have you (put an X between the brackets on each line to confirm):
* [ ] Written new test cases to ensure no regression bugs occur?
* [ ] Ensured all test cases are now passing?
* [ ] Ensured that PowerShell Script Analyser issues and warnings are completely resolved?
* [ ] Updated any help or documentation that may be impacted by your changes?

### Description of the Change

[ We must be able to understand the design of your change from this description. If we cannot get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts. ]

### Testing

[ Please describe the testing you have performed ]

### Associated/Resolved Issues

[ Enter any applicable issues here ]

> Note: By creating a pull request, you are expected to comply with this project's Code of Conduct.
<!--
This template is based upon the work by the Atom project, https://github.com/atom/atom/
-->
Empty file added .gitignore
Empty file.
35 changes: 35 additions & 0 deletions .vscode/PSScriptAnalyzerSettings.psd1
@@ -0,0 +1,35 @@

@{
# Use Severity when you want to limit the generated diagnostic records to a
# subset of: Error, Warning and Information.
# Uncomment the following line if you only want Errors and Warnings but
# not Information diagnostic records.
#Severity = @('Error','Warning')

# Use IncludeRules when you want to run only a subset of the default rule set.
#IncludeRules = @('PSAvoidDefaultValueSwitchParameter',
# 'PSMisleadingBacktick',
# 'PSMissingModuleManifestField',
# 'PSReservedCmdletChar',
# 'PSReservedParams',
# 'PSShouldProcess',
# 'PSUseApprovedVerbs',
# 'PSUseDeclaredVarsMoreThanAssigments')

# Use ExcludeRules when you want to run most of the default set of rules except
# for a few rules you wish to "exclude". Note: if a rule is in both IncludeRules
# and ExcludeRules, the rule will be excluded.
#ExcludeRules = @('PSAvoidUsingWriteHost')

# You can use the following entry to supply parameters to rules that take parameters.
# For instance, the PSAvoidUsingCmdletAliases rule takes a whitelist for aliases you
# want to allow.
#Rules = @{
# Do not flag 'cd' alias.
# PSAvoidUsingCmdletAliases = @{Whitelist = @('cd')}

# Check if your script uses cmdlets that are compatible on PowerShell Core,
# version 6.0.0-alpha, on Linux.
# PSUseCompatibleCmdlets = @{Compatibility = @("core-6.0.0-alpha-linux")}
#}
}
56 changes: 56 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,56 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Pester Tests",
"script": "Invoke-Pester",
"args": [],
"cwd": "${workspaceRoot}"
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Launch Current File",
"script": "${file}",
"args": [],
"cwd": "${file}"
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Launch Current File in Temporary Console",
"script": "${file}",
"args": [],
"cwd": "${file}",
"createTemporaryIntegratedConsole": true
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Launch Current File w/Args Prompt",
"script": "${file}",
"args": [
"${command:SpecifyScriptArgs}"
],
"cwd": "${file}"
},
{
"type": "PowerShell",
"request": "attach",
"name": "PowerShell Attach to Host Process",
"processId": "${command:PickPSHostProcess}",
"runspaceId": 1
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Interactive Session",
"cwd": "${workspaceRoot}"
}
]
}
45 changes: 45 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,45 @@
{
//
// Custom Settings for Project
//
// These are here so that anyone potentially modifying the code base has the same editor experience, this ensures that the code will follow the same structure.
// Controls how the editor should render whitespace characters, possibilities are 'none', 'boundary', and 'all'. The 'boundary' option does not render single spaces between words.
"editor.renderWhitespace": "all", // Default: none
// Controls whether the editor should render control characters
"editor.renderControlCharacters": true, // Default: false
// Number of spaces for tabs
"editor.tabSize": 4, // Default: 4
// Use spaces not tabs
"editor.insertSpaces": true, // Default: true
// When enabled, will trim trailing whitespace when you save a file.
"files.trimTrailingWhitespace": true, // Default: false
// Does not reformat one-line code blocks, such as "if (...) {...} else {...}".
"powershell.codeFormatting.ignoreOneLineBlock": false, // Default: True
// Adds a newline (line break) after a closing brace.
"powershell.codeFormatting.newLineAfterCloseBrace": true, // Default: True
// Adds a newline (line break) after an open brace.
"powershell.codeFormatting.newLineAfterOpenBrace": true, // Default: True
// Places open brace on the same line as its associated statement.
"powershell.codeFormatting.openBraceOnSameLine": true, // Default: True
// Adds a space after a separator (',' and ';').
"powershell.codeFormatting.whitespaceAfterSeparator": false, // Default: True
// Adds spaces before and after an operator ('=', '+', '-', etc.).
"powershell.codeFormatting.whitespaceAroundOperator": true, // Default: True
// Adds a space between a keyword and its associated scriptblock expression.
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true, // Default: True
// Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.
"powershell.codeFormatting.whitespaceBeforeOpenParen": true, // Default: True
// Align assignment statements in a hashtable or a DSC Configuration.
"powershell.codeFormatting.alignPropertyValuePairs": true, // Default: True
//Sets the codeformatting options to follow the given indent style in a way that is compatible with PowerShell syntax. For more information about the brace styles please refer to https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81.
"powershell.codeFormatting.preset": "OTBS", // Default: Custom
// Format a file on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down.
"editor.formatOnSave": false, // Default: False
// Langage specific settings
"[json]": {
// Number of spaces for tabs
"editor.tabSize": 2
},
//Specifies the path to a PowerShell Script Analyzer settings file. To override the default settings for all projects, enter an absolute path, or enter a path relative to your workspace.
"powershell.scriptAnalysis.settingsPath": ".vscode/PSScriptAnalyzerSettings.psd1"
}
120 changes: 120 additions & 0 deletions .vscode/tasks.json
@@ -0,0 +1,120 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${relativeFile}: the current opened file relative to workspaceRoot
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",

// Start PowerShell
"windows": {
"command": "${env:windir}/System32/WindowsPowerShell/v1.0/powershell.exe",
"args": [ "-NoProfile", "-ExecutionPolicy", "Bypass" ]
},
"linux": {
"command": "/usr/bin/pwsh",
"args": [ "-NoProfile" ]
},
"osx": {
"command": "/usr/local/bin/pwsh",
"args": [ "-NoProfile" ]
},

// The command is a shell script
"isShellCommand": true,

// Show the output window always
"showOutput": "always",

// Associate with test task runner
"tasks": [
{
"taskName": "Clean",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Clean'; Invoke-psake build.psake.ps1 -taskList Clean;",
"Invoke-Command { Write-Host 'Completed Clean task in task runner.' }"
]
},
{
"taskName": "Build",
"suppressTaskName": true,
"isBuildCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Build'; Invoke-psake build.psake.ps1 -taskList Build;",
"Invoke-Command { Write-Host 'Completed Build task in task runner.' }"
]
},
{
"taskName": "BuildHelp",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList BuildHelp'; Invoke-psake build.psake.ps1 -taskList BuildHelp;",
"Invoke-Command { Write-Host 'Completed BuildHelp task in task runner.' }"
]
},
{
"taskName": "Analyze",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Analyze'; Invoke-psake build.psake.ps1 -taskList Analyze;",
"Invoke-Command { Write-Host 'Completed Analyze task in task runner.' }"
]
},
{
"taskName": "Install",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Install'; Invoke-psake build.psake.ps1 -taskList Install;",
"Invoke-Command { Write-Host 'Completed Install task in task runner.' }"
]
},
{
"taskName": "Publish",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Publish'; Invoke-psake build.psake.ps1 -taskList Publish;",
"Invoke-Command { Write-Host 'Completed Publish task in task runner.' }"
]
},
{
"taskName": "Test",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
],
"problemMatcher": [
{
"owner": "powershell",
"fileLocation": ["absolute"],
"severity": "error",
"pattern": [
{
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
"message": 1
},
{
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
"file": 1,
"line": 2
}
]
}
]
}
]
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,19 @@
# PSGPOTool Release History

## Version Number - Release Date

### Fixed

* First item fixed
* Second item fixed

### Added

* New item added
* Another new item added

### Changed

* Feature changed
* Tests added

22 changes: 22 additions & 0 deletions LICENSE.md
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2019 NicolasB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit a9abda3

Please sign in to comment.