Skip to content

Commit

Permalink
Merge pull request #4 from andrewrdavidson/release-1.0.3
Browse files Browse the repository at this point in the history
Made supporting functions parameters mandatory
  • Loading branch information
andrewrdavidson authored Dec 21, 2020
2 parents 9094b2a + c145c15 commit 0ed1136
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PSQualityCheck.Functions.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'PSQualityCheck.Functions.psm1'

# Version number of this module.
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
30 changes: 29 additions & 1 deletion PSQualityCheck.Functions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Convert-Help {
[CmdletBinding()]
[OutputType([HashTable], [System.Exception])]
param (
[parameter(Mandatory = $true)]
[string]$HelpComment
)

Expand Down Expand Up @@ -160,12 +161,14 @@ function Export-FunctionsFromModule {
A string Path containing the full path to the extraction folder
.EXAMPLE
Export-FunctionsFromModule -Path 'c:\path.to\module.psm1'
Export-FunctionsFromModule -Path 'c:\path.to\module.psm1' -FunctionExtractionPath 'c:\extract'
#>
[CmdletBinding()]
[OutputType([System.Void])]
param (
[parameter(Mandatory = $true)]
[string]$Path,
[parameter(Mandatory = $true)]
[string]$FunctionExtractPath
)

Expand Down Expand Up @@ -267,6 +270,7 @@ function Get-FileContent {
[CmdletBinding()]
[OutputType([System.String[]])]
param (
[parameter(Mandatory = $true)]
[string]$File
)

Expand Down Expand Up @@ -344,7 +348,9 @@ function Get-FileList {
[CmdletBinding()]
[OutputType([System.String[]])]
param (
[parameter(Mandatory = $true)]
[string]$Path,
[parameter(Mandatory = $true)]
[string]$Extension
)

Expand Down Expand Up @@ -387,7 +393,9 @@ function Get-FunctionCount {
[CmdletBinding()]
[OutputType([Int[]])]
param (
[parameter(Mandatory = $true)]
[string]$ModuleFile,
[parameter(Mandatory = $true)]
[string]$ManifestFile
)

Expand Down Expand Up @@ -451,6 +459,7 @@ function Get-ParsedContent {
[CmdletBinding()]
[OutputType([System.Object[]])]
param (
[parameter(Mandatory = $true)]
[string]$Content
)

Expand Down Expand Up @@ -479,6 +488,7 @@ function Get-ParsedFile {
[CmdletBinding()]
[OutputType([System.Object[]])]
param (
[parameter(Mandatory = $true)]
[string]$Path
)

Expand Down Expand Up @@ -517,6 +527,7 @@ function Get-ScriptParameters {
[OutputType([System.Exception], [HashTable])]
param
(
[parameter(Mandatory = $true)]
[String]$Content
)

Expand Down Expand Up @@ -599,8 +610,11 @@ function Get-Token {
[CmdletBinding()]
[OutputType([System.Object[]])]
param (
[parameter(Mandatory = $true)]
[System.Object[]]$ParsedFileContent,
[parameter(Mandatory = $true)]
[string]$Type,
[parameter(Mandatory = $true)]
[string]$Content
)

Expand Down Expand Up @@ -632,7 +646,9 @@ function Get-TokenComponent {
[CmdletBinding()]
[OutputType([System.Object[]])]
param (
[parameter(Mandatory = $true)]
[System.Object[]]$ParsedFileContent,
[parameter(Mandatory = $true)]
[int]$StartLine
)

Expand Down Expand Up @@ -669,8 +685,11 @@ function Get-TokenMarker {
[CmdletBinding()]
[OutputType([System.Object[]])]
param (
[parameter(Mandatory = $true)]
[System.Object[]]$ParsedFileContent,
[parameter(Mandatory = $true)]
[string]$Type,
[parameter(Mandatory = $true)]
[string]$Content
)

Expand Down Expand Up @@ -702,6 +721,7 @@ function Test-HelpForRequiredTokens {
[CmdletBinding()]
[OutputType([System.Exception], [System.Void])]
param (
[parameter(Mandatory = $true)]
[HashTable]$HelpTokens
)

Expand Down Expand Up @@ -768,6 +788,7 @@ function Test-HelpForUnspecifiedTokens {
[CmdletBinding()]
[OutputType([System.Exception], [System.Void])]
param (
[parameter(Mandatory = $true)]
[HashTable]$HelpTokens
)

Expand Down Expand Up @@ -842,6 +863,7 @@ function Test-HelpTokensCountIsValid {
[CmdletBinding()]
[OutputType([System.Exception], [System.Void])]
param (
[parameter(Mandatory = $true)]
[HashTable]$HelpTokens
)

Expand Down Expand Up @@ -933,7 +955,9 @@ function Test-HelpTokensParamsMatch {
[CmdletBinding()]
[OutputType([System.Exception], [System.String[]])]
param (
[parameter(Mandatory = $true)]
[HashTable]$HelpTokens,
[parameter(Mandatory = $true)]
[PSCustomObject]$ParameterVariables
)

Expand Down Expand Up @@ -1025,6 +1049,7 @@ function Test-HelpTokensTextIsValid {
[CmdletBinding()]
[OutputType([System.Exception], [System.Void])]
param (
[parameter(Mandatory = $true)]
[HashTable]$HelpTokens
)

Expand Down Expand Up @@ -1084,7 +1109,9 @@ function Test-ImportModuleIsValid {
[CmdletBinding()]
[OutputType([System.Exception], [System.Void])]
param(
[parameter(Mandatory = $true)]
[System.Object[]]$ParsedFile,
[parameter(Mandatory = $true)]
[System.Object[]]$ImportModuleTokens
)

Expand Down Expand Up @@ -1151,6 +1178,7 @@ function Test-ParameterVariablesHaveType {
[OutputType([System.Exception], [System.Void])]
param
(
[parameter(Mandatory = $true)]
[HashTable]$ParameterVariables
)

Expand Down
2 changes: 1 addition & 1 deletion PSQualityCheck.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'PSQualityCheck.psm1'

# Version number of this module.
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit 0ed1136

Please sign in to comment.