PowerShell / PowerShell/PSScriptAnalyzer

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

Abierto
#1,189 16 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Area - Engine Area - Performance
Lenguaje dominante
C#
Estrellas
2.2k
Forks
414
Merge medio
13 h 1 min
PR fusionados (30 d)
2

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo Invoke-ScriptAnalyzer -Path C:\Support\GitHub\Dashimo -Recurse -Verbose en Windows PowerShell 5.1 con PSScriptAnalyzer 1.18.0, comparando las ejecuciones recursiva y no recursiva. Investiga el manejo de la ruta recursiva usando el proyecto reportado y la ubicación enlazada mediante hardlink; se considera terminado cuando el comando finaliza normalmente y la regresión queda cubierta por una prueba adecuada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
powershell
Área
performance, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.