PowerShell / PowerShell/PSScriptAnalyzer

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

Offen
#1,189 16 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Area - Engine Area - Performance
Vorherrschende Sprache
C#
Sterne
2.2k
Forks
414
Ø Merge
13 Std. 1 Min.
Gemergte PRs (30 T.)
2

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, Invoke-ScriptAnalyzer -Path C:\Support\GitHub\Dashimo -Recurse -Verbose unter Windows PowerShell 5.1 mit PSScriptAnalyzer 1.18.0 auszuführen und rekursive und nicht rekursive Läufe zu vergleichen. Untersuche die Handhabung des rekursiven Pfads anhand des gemeldeten Projekts und des per Hardlink verknüpften Speicherorts; abgeschlossen ist die Aufgabe, wenn der Befehl normal beendet wird und die Regression durch einen geeigneten Test abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell
Bereich
performance, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.