Skip to content

Commit 20610d8

Browse files
committed
Fix ScriptAnalyzer
1 parent 27669fb commit 20610d8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Source/Private/GetRelativePath.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ function GetRelativePath {
44
Returns the relative path, or $Path if the paths don't share the same root.
55
For backward compatibility, this is [System.IO.Path]::GetRelativePath for .NET 4.x
66
#>
7+
[OutputType([string])]
78
[CmdletBinding()]
89
param(
910
# The source path the result should be relative to. This path is always considered to be a directory.

test.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#requires -Module PowerShellGet, Pester
22
using namespace Microsoft.PackageManagement.Provider.Utility
33
param(
4+
[switch]$SkipScriptAnalyzer,
45
[switch]$SkipCodeCoverage,
56
[switch]$HideSuccess,
67
[switch]$IncludeVSCodeMarker
@@ -41,6 +42,10 @@ if (-not $SkipCodeCoverage) {
4142
Invoke-Pester ./Tests -Show $Show -PesterOption @{ IncludeVSCodeMarker = $IncludeVSCodeMarker }
4243
}
4344

45+
Write-Host
46+
if (-not $SkipScriptAnalyzer) {
47+
Invoke-ScriptAnalyzer $ModuleUnderTest.Path
48+
}
4449
Pop-Location
4550

4651
# Re-enable default parameters after testing

0 commit comments

Comments
 (0)