PowerShell / PowerShell/PSScriptAnalyzer
Invoke-ScriptAnalyzer -Recurse taking forever (60+ seconds) to finish
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 2.2k
- 分支
- 415
- 平均合併
- 13 小時 1 分鐘
- 30 天內合併 PR
- 2
描述
To be honest, this is my first time ever I tried to use Invoke-ScriptAnalyzer. So please be patient with me and if I am doing things wrong please let me know. Most of the time I use defaults on VSCode but I wanted to play with it today a bit. I have very simple project with just few files. When I used -Recurse it's stuck. I am not sure if this is just my setup or I need to wait much much longer but it would seem weird for it to be waiting like that on 100 lines.
Keep in mind that my C:\Support\Github is actually hardlinked.

Now I am wondering if that is not being a problem overall for all my reports about broken stuff in VSCode where I get lots and lots of perf issues,, broken links. Notice how C: is actually missing from fsutil.exe output. I am not sure if that's supposed to be like that thou and how it would affect your tool.
I did move the project to Desktop or tried using OneDrive folder directly but it didn't change the output so maybe it's not related.
I did try this outside of VSCode with same results.
Steps to reproduce
Invoke-ScriptAnalyzer -Path C:\Support\GitHub\Dashimo -Recurse -Verbose
Expected behavior
Finishing up.
Actual behavior

Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.18.0
1.17.1
1.17.1
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,在使用 PSScriptAnalyzer 1.18.0 的 Windows PowerShell 5.1 上重現 Invoke-ScriptAnalyzer -Path C:\Support\GitHub\Dashimo -Recurse -Verbose,並比較遞迴和非遞迴執行。使用已回報的專案和硬連結位置調查遞迴路徑處理;完成的標準是命令正常完成,且回歸由適當的測試涵蓋。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- powershell
- 領域
- performance, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100