From 23ce10ee43519782e61d01247a7143935f4a3372 Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Thu, 18 Jan 2024 13:36:04 +0000 Subject: [PATCH 1/2] Fix checks file references; code formatting --- Source/PSQualityCheck/private/GetTagList.ps1 | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/PSQualityCheck/private/GetTagList.ps1 b/Source/PSQualityCheck/private/GetTagList.ps1 index b8ab0ab..69acdfb 100644 --- a/Source/PSQualityCheck/private/GetTagList.ps1 +++ b/Source/PSQualityCheck/private/GetTagList.ps1 @@ -20,47 +20,47 @@ function GetTagList { $modulePath = (Get-Module -Name 'PSQualityCheck').ModuleBase - $checksPath = (Join-Path -Path $modulePath -ChildPath "data") + $checksPath = (Join-Path -Path $modulePath -ChildPath 'data') - Get-Content -Path (Join-Path -Path $checksPath -ChildPath "Module.Tests.ps1") -Raw | ForEach-Object { + Get-Content -Path (Join-Path -Path $checksPath -ChildPath 'Module.Checks.ps1') -Raw | ForEach-Object { $ast = [Management.Automation.Language.Parser]::ParseInput($_, [ref]$null, [ref]$null) $ast.FindAll( { param($node) $node -is [System.Management.Automation.Language.CommandAst] -and - $node.CommandElements[0].Value -eq "Describe" -and + $node.CommandElements[0].Value -eq 'Describe' -and $node.CommandElements[2] -is [System.Management.Automation.Language.CommandParameterAst] -and - $node.CommandElements[2].ParameterName -eq "Tag" + $node.CommandElements[2].ParameterName -eq 'Tag' }, $true) | ForEach-Object { $moduleTags += $_.CommandElements[3].Value } $ast.FindAll( { param($node) $node -is [System.Management.Automation.Language.CommandAst] -and - $node.CommandElements[0].Value -eq "It" -and + $node.CommandElements[0].Value -eq 'It' -and $node.CommandElements[2] -is [System.Management.Automation.Language.CommandParameterAst] -and - $node.CommandElements[2].ParameterName -eq "Tag" + $node.CommandElements[2].ParameterName -eq 'Tag' }, $true) | ForEach-Object { $moduleTags += $_.CommandElements[3].Value } } - Get-Content -Path (Join-Path -Path $checksPath -ChildPath "Script.Tests.ps1") -Raw | ForEach-Object { + Get-Content -Path (Join-Path -Path $checksPath -ChildPath 'Script.Checks.ps1') -Raw | ForEach-Object { $ast = [Management.Automation.Language.Parser]::ParseInput($_, [ref]$null, [ref]$null) $ast.FindAll( { param($node) $node -is [System.Management.Automation.Language.CommandAst] -and - $node.CommandElements[0].Value -eq "Describe" -and + $node.CommandElements[0].Value -eq 'Describe' -and $node.CommandElements[2] -is [System.Management.Automation.Language.CommandParameterAst] -and - $node.CommandElements[2].ParameterName -eq "Tag" + $node.CommandElements[2].ParameterName -eq 'Tag' }, $true) | ForEach-Object { $scriptTags += $_.CommandElements[3].Value } $ast.FindAll( { param($node) $node -is [System.Management.Automation.Language.CommandAst] -and - $node.CommandElements[0].Value -eq "It" -and + $node.CommandElements[0].Value -eq 'It' -and $node.CommandElements[2] -is [System.Management.Automation.Language.CommandParameterAst] -and - $node.CommandElements[2].ParameterName -eq "Tag" + $node.CommandElements[2].ParameterName -eq 'Tag' }, $true) | ForEach-Object { $scriptTags += $_.CommandElements[3].Value } From d4afcb55b1becf437b6c487e03ff0ae8f2d04af0 Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Thu, 18 Jan 2024 13:36:20 +0000 Subject: [PATCH 2/2] Change version to 2.0.3 --- Source/PSQualityCheck/PSQualityCheck.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/PSQualityCheck/PSQualityCheck.psd1 b/Source/PSQualityCheck/PSQualityCheck.psd1 index a081097..bcba0e6 100644 --- a/Source/PSQualityCheck/PSQualityCheck.psd1 +++ b/Source/PSQualityCheck/PSQualityCheck.psd1 @@ -12,7 +12,7 @@ RootModule = 'PSQualityCheck.psm1' # Version number of this module. - ModuleVersion = '2.0.2' + ModuleVersion = '2.0.3' # Supported PSEditions # CompatiblePSEditions = @()