PowerShell / PowerShell/PSScriptAnalyzer
Additional settings file for developement
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 414
- Merge medio
- 13 h 1 min
- PR fusionados (30 d)
- 2
Descripción
Summary of the new feature
There is currently one PSScriptAnalyzerSettings.psd1 file shipped with the PSScriptAnalyzer but there are at least two use cases with a different requirement:
-
Design-time
During this phase (often done is VSCode or Visual Studio), any cutting-edge alert for a potential PowerShell pitfall is welcome. -
Continuous Integration
During this phase (e.g. in a CI/CD street), any change is supposed to passed the given tests.
Apparently, there is a (undocumented?) convention that our convention is to ship it opt-in via ConfigurableRule with Enable = false but that convention only satisfies the builder phase.
Proposed technical implementation details (optional)
Ship the PSScriptAnalyzer with an additional settings file that is focused on the development phase.
The "development" settings file might than be used as a default by e.g. VSCode (powershell.scriptAnalysis.settingsPath).
Caveats
- The settings file under VSCode "This setting may not work as expected currently!", see: https://github.com/PowerShell/vscode-powershell/issues/4653
- https://github.com/PowerShell/vscode-powershell/issues/5385? "Users keep getting bitten by the extension's effective defaults differing from Invoke-ScriptAnalyzer's defaults", I believe this isn't a feature but a bug, see: https://github.com/PowerShell/vscode-powershell/issues/5474
What is the latest version of PSScriptAnalyzer at the point of writing
1.25.0
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el archivo incluido PSScriptAnalyzerSettings.psd1 y la configuración de VSCode powershell.scriptAnalysis.settingsPath mencionada en el issue. Compara los requisitos de tiempo de diseño y CI, y determina después las reglas orientadas al desarrollo y cómo debe distribuirse el archivo adicional. Se considera terminado cuando haya disponible un archivo de configuración de desarrollo separado sin cambiar el archivo de configuración existente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100