Skip to content

Commit

Permalink
Added source code and build script; rename Tests folder to Checks for…
Browse files Browse the repository at this point in the history
… consistency with Invoke-PSScriptChecks command
  • Loading branch information
andrewrdavidson committed Dec 29, 2020
1 parent c9cd15d commit 6bff8b1
Show file tree
Hide file tree
Showing 32 changed files with 2,033 additions and 192 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
192 changes: 94 additions & 98 deletions PSQualityCheck.Functions.psd1
Original file line number Diff line number Diff line change
@@ -1,143 +1,139 @@
#
# Module manifest for module 'PSQualityCheck.Functions'
#
# Generated by: Andrew Davidson
#
# Generated on: 29/12/2020
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'PSQualityCheck.Functions.psm1'
# Script module or binary module file associated with this manifest.
RootModule = 'PSQualityCheck.Functions.psm1'

# Version number of this module.
ModuleVersion = '1.0.7'
# Version number of this module.
ModuleVersion = '1.0.8'

# Supported PSEditions
# CompatiblePSEditions = @()
# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '5ddfdef7-3985-476d-92d8-e7db35bf960b'
# ID used to uniquely identify this module
GUID = '5ddfdef7-3985-476d-92d8-e7db35bf960b'

# Author of this module
Author = 'Andrew Davidson'
# Author of this module
Author = 'Andrew Davidson'

# Company or vendor of this module
# CompanyName = 'Unknown'
# Company or vendor of this module
CompanyName = 'Andrew Davidson'

# Copyright statement for this module
Copyright = '(c) Andrew Davidson. All rights reserved.'
# Copyright statement for this module
Copyright = '(c) Andrew Davidson. All rights reserved.'

# Description of the functionality provided by this module
Description = 'This module contains supporting functions for PSQualityCheck.'
# Description of the functionality provided by this module
Description = 'This module contains supporting functions for PSQualityCheck.'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.0'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.0'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @('PSQualityCheck.Pester.Functions')
# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @(
'Convert-Help',
'Export-FunctionsFromModule',
'Get-FileContent',
'Get-FileList',
'Get-FunctionCount',
'Get-ParsedContent',
'Get-ParsedFile',
'Get-ScriptParameters',
'Get-Token',
'Get-TokenComponent',
'Get-TokenMarker',
'Test-HelpForRequiredTokens',
'Test-HelpForUnspecifiedTokens',
'Test-HelpTokensCountIsValid',
'Test-HelpTokensParamsMatch',
'Test-HelpTokensTextIsValid',
'Test-ImportModuleIsValid',
'Test-ParameterVariablesHaveType'
)
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Convert-Help', 'Export-FunctionsFromModule', 'Get-FileContent',
'Get-FileList', 'Get-FunctionCount', 'Get-ParsedContent',
'Get-ParsedFile', 'Get-ScriptParameters', 'Get-Token',
'Get-TokenComponent', 'Get-TokenMarker', 'Test-HelpForRequiredTokens',
'Test-HelpForUnspecifiedTokens', 'Test-HelpTokensCountIsValid',
'Test-HelpTokensParamsMatch', 'Test-HelpTokensTextIsValid',
'Test-ImportModuleIsValid', 'Test-ParameterVariablesHaveType'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = @()
# Variables to export from this module
# VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()

# DSC resources to export from this module
# DscResourcesToExport = @()
# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()
# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
FileList = @('Tests\HelpElementRules.psd1')
# List of all files packaged with this module
FileList = 'Checks\HelpElementRules.psd1'

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('powershell', 'powershell-module', 'tests', 'quality', 'quality-check', 'pester', 'pester-tests')
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'powershell', 'powershell-module', 'tests', 'quality', 'quality-check',
'pester', 'pester-tests'

# A URL to the license for this module.
LicenseUri = 'https://github.com/andrewrdavidson/PSQualityCheck/blob/main/LICENSE'
# A URL to the license for this module.
LicenseUri = 'https://github.com/andrewrdavidson/PSQualityCheck/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/andrewrdavidson/PSQualityCheck'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/andrewrdavidson/PSQualityCheck'

# A URL to an icon representing this module.
# IconUri = ''
# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''
# ReleaseNotes of this module
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()
# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable
} # End of PSData hashtable

} # End of PrivateData hashtable
} # End of PrivateData hashtable

# HelpInfo URI of this module
HelpInfoURI = 'https://github.com/andrewrdavidson/PSQualityCheck/wiki'
# HelpInfo URI of this module
HelpInfoURI = 'https://github.com/andrewrdavidson/PSQualityCheck/wiki'

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}

19 changes: 10 additions & 9 deletions PSQualityCheck.Functions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,14 @@ function Test-HelpForRequiredTokens {

$module = Get-Module -Name PSQualityCheck

if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1")) {
if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1")) {

$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1"))
$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1"))

}
else {

throw "Unable to load Tests\HelpElementRules.psd1"
throw "Unable to load Checks\HelpElementRules.psd1"

}

Expand Down Expand Up @@ -826,14 +826,14 @@ function Test-HelpForUnspecifiedTokens {

$module = Get-Module -Name PSQualityCheck

if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1")) {
if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1")) {

$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1"))
$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1"))

}
else {

throw "Unable to load Tests\HelpElementRules.psd1"
throw "Unable to load Checks\HelpElementRules.psd1"

}

Expand Down Expand Up @@ -901,14 +901,14 @@ function Test-HelpTokensCountIsValid {

$module = Get-Module -Name PSQualityCheck

if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1")) {
if (Test-Path -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1")) {

$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Tests\HelpElementRules.psd1"))
$helpElementRules = (Import-PowerShellDataFile -Path (Join-Path -Path $module.ModuleBase -ChildPath "Checks\HelpElementRules.psd1"))

}
else {

throw "Unable to load Tests\HelpElementRules.psd1"
throw "Unable to load Checks\HelpElementRules.psd1"

}

Expand Down Expand Up @@ -1239,3 +1239,4 @@ function Test-ParameterVariablesHaveType {
}

}

Loading

0 comments on commit 6bff8b1

Please sign in to comment.