![](/img/trans.png)
[英]Powershell for Linux: Combining commands with pipe sign doesn't work
有什么方法可以為 Linux 連接 Powershell 中的命令? 這就是我要運行的: pwsh -Command Invoke-ScriptAnalyzer -Path. | ConvertTo-Json | Out-File -FilePath "/home/administrator/scr ...
[英]Powershell for Linux: Combining commands with pipe sign doesn't work
有什么方法可以為 Linux 連接 Powershell 中的命令? 這就是我要運行的: pwsh -Command Invoke-ScriptAnalyzer -Path. | ConvertTo-Json | Out-File -FilePath "/home/administrator/scr ...
[英]Is there a way I can publish PS Script Analyzer results via Nunit (or similar) during a build pipeline?
我想通過 Nunit 發布我的 static 分析結果。 我正在使用 Pester 這樣做,但是這是在 Pester 的配置設置中設置的。 使用 PS 腳本分析器時,有什么方法可以做同樣的事情嗎? 我在文檔中找不到有關它的信息。 這是我當前的代碼: ...
[英]PSScriptAnalyzer is not working in my Visual Studio Code
我在設置中啟用了它(腳本分析:啟用)。 我有 ScriptAnalyzerSettings.psd1 的設置路徑集我可以在 PowerShell 集成控制台中調用 Get-ScriptAnalyzerRule 或 Invoke-ScriptAnalyzer 並且它可以工作(並根據規則顯示警告/錯誤) ...
[英]PowerShell Aliases, PSScriptAnalyzer and VSCode
有沒有辦法抑制PSScriptAnalyzer突出顯示alias警告? 例如 PowerShell 中的別名非常有用。 我有一個簡單的規則:我只在腳本中使用合理的內置別名(我忽略了奇怪的別名)。 為什么? 好吧,這些特定別名中的大多數現在已有 13 年歷史並且從未改變過(PowerShell ...
[英]How to create a case sensitive Hashtable without generating a PSScriptAnalyzer warning?
默認情況下,PowerShell 創建的哈希表(例如$hashtable = @{} )不區分大小寫。 對於我的腳本,我想明確創建一個區分大小寫的哈希表。 這可以通過以下方式完成: 或者: 但我想讓我的腳本也符合默認的PSScriptAnalyzer規則。 對於上述區分大小寫的哈希表示例 ...