PowerShell / PowerShell/PSScriptAnalyzer

Invoke-ScriptAnalyzer -Recurse taking forever (60+ seconds) to finish

Đang mở
#1,189 16 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Area - Engine Area - Performance
Ngôn ngữ chính
C#
Star
2.2k
Fork
414
Merge trung bình
13 giờ 1 phút
Pull request đã merge (30 ngày)
2

Mô tả

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.

image

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

PSScriptAnalyzer

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện Invoke-ScriptAnalyzer -Path C:\Support\GitHub\Dashimo -Recurse -Verbose trên Windows PowerShell 5.1 với PSScriptAnalyzer 1.18.0, đồng thời so sánh các lần chạy đệ quy và không đệ quy. Điều tra việc xử lý đường dẫn đệ quy bằng dự án đã được báo cáo và vị trí được liên kết bằng hardlink; được coi là hoàn tất khi lệnh hoàn thành bình thường và hồi quy được bao phủ bởi một bài kiểm thử phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
powershell
Lĩnh vực
performance, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.