We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9faf37c commit e405ca8Copy full SHA for e405ca8
1 file changed
PSScriptAnalyzer-wrapper.ps1
@@ -1,8 +1,8 @@
1
-#!/usr/bin/env pwsh
2
-
3
# Copyright © 2023 Mohamed El Morabity
+# Copyright © 2024 Ophios GmbH
4
# SPDX-License-Identifier: GPL-3.0-or-later
5
+[CmdletBinding()]
6
Param(
7
# Analyze options
8
[Parameter(Mandatory = $true, ParameterSetName = 'Check', Position = 0)]
@@ -37,9 +37,13 @@ Param(
37
[String]$Settings
38
)
39
40
-Set-StrictMode -Version Latest
+if ([Environment]::GetEnvironmentVariable('PRE_COMMIT_PWSH_VERBOSE')) {
41
+ $VerbosePreference = 'Continue'
42
+}
43
$ErrorActionPreference = 'Stop'
44
45
+Set-StrictMode -Version Latest
46
+
47
# Install PSScriptAnalyzer if not available
48
if (-not (Get-InstalledModule PSScriptAnalyzer -ErrorAction SilentlyContinue)) {
49
Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Force -AllowClobber
0 commit comments