Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions 17 .github/linters/.powershell-psscriptanalyzer.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Cmdlets/Invoke-ScriptAnalyzer.md#-settings
@{
#CustomRulePath='path\to\CustomRuleModule.psm1'
#RecurseCustomRulePath='path\of\customrules'
#Severity = @(
# 'Error'
# 'Warning'
#)
#IncludeDefaultRules=${true}
ExcludeRules = @(
'PSMissingModuleManifestField'
)
#IncludeRules = @(
# 'PSAvoidUsingWriteHost',
# 'MyCustomRuleName'
#)
}
File renamed without changes.
32 changes: 0 additions & 32 deletions 32 src/PSModule/PSModule.psm1

This file was deleted.

8 changes: 0 additions & 8 deletions 8 src/PSModule/modules/OtherPSModule.psm1

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions 16 src/modules/OtherPSModule.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Function Get-OtherPSModule {
<#
.SYNOPSIS
A brief description of the function

.EXAMPLE
Get-OtherPSModule -Name "World"
#>
[CmdletBinding()]
param(
# The name of the person to greet.
[Parameter(Mandatory)]
[string] $Name
)
Write-Output "Hello, $Name!"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
Get-InternalPSModule -Name 'World'

"Hello, World!"
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
Set-InternalPSModule -Name 'World'

"Hello, World!"
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions', '', Scope='Function',
'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
Justification = 'Reason for suppressing'
)]
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Function Test-PSModule {
Function Get-PSModuleTemplate {
<#
.SYNOPSIS
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
Get-PSModuleTemplate -Name 'World'

"Hello, World!"
#>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Function Set-PSModule {
Function New-PSModuleTemplate {
<#
.SYNOPSIS
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
New-PSModuleTemplate -Name 'World'

"Hello, World!"
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions', '', Scope='Function',
'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
Justification = 'Reason for suppressing'
)]
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Function New-PSModule {
Function Set-PSModuleTemplate {
<#
.SYNOPSIS
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
Set-PSModuleTemplate -Name 'World'

"Hello, World!"
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions', '', Scope='Function',
'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
Justification = 'Reason for suppressing'
)]
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Function Get-PSModule {
Function Test-PSModuleTemplate {
<#
.SYNOPSIS
Performs tests on a module.

.EXAMPLE
Test-PSModule -Name 'World'
Test-PSModuleTemplate -Name 'World'

"Hello, World!"
#>
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions 27 tests/Module.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[CmdletBinding()]
Param(
# Path to the module to test.
[Parameter()]
[string] $Path
)

Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'PSModuleTemplate' {
Context 'Module' {
It 'The module should be available' {
Get-Module -Name 'PSModuleTemplate' -ListAvailable | Should -Not -BeNullOrEmpty
Write-Verbose (Get-Module -Name 'PSModuleTemplate' -ListAvailable | Out-String) -Verbose
}
It 'The module should be importable' {
{ Import-Module -Name 'PSModuleTemplate' -Verbose -RequiredVersion 999.0.0 -Force } | Should -Not -Throw
}
}

Context "Function 'Test-PSModuleTemplate'" {
It 'Should be able to call the function' {
Test-PSModuleTemplate -Name 'World' | Should -Be 'Hello, World!'
Write-Verbose (Test-PSModuleTemplate -Name 'World' | Out-String) -Verbose
}
}
}
27 changes: 0 additions & 27 deletions 27 tests/PSModule.Tests.ps1

This file was deleted.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.