PowerShell / PowerShell/PSScriptAnalyzer
Allow modules to provide rules
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
as a user/developer I would like to have rules be defined as a part of a module.
As it stands now, the only possibility i can see right now to import "custom" rules is via CustomRulePath, however documentation and testing leads me to believe this only supports a known static or relative path.
Proposed technical implementation details (optional)
As a part of your documentation you talk about MEF, but this is possibly only for CustomRulePath? I can see as part of instance that you have ValidModPaths, but it seemes to only have data appended by methods in reference to GetValidCustomRulePaths()?
- checking all commands in psmodulepath that outputs
Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord?- Alternativly you could have the module require to have psdata.ExternalModuleDependencies defined to scriptanalyzer?
- alternativly you can add
usingModulesto settings so you dont need to re-check all modules in current runspace, but just the ones defined by the user
I want Scriptanalyzer to also check available rules from modules.
What is the latest version of PSScriptAnalyzer at the point of writing
1.24.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 revisando el comportamiento documentado de CustomRulePath y MEF; después, inspecciona ValidModPaths y GetValidCustomRulePaths() para entender el descubrimiento actual de reglas personalizadas. Aclara el enfoque previsto para el descubrimiento o la configuración de módulos y define cómo deben reconocerse las reglas de módulo disponibles como implementaciones de DiagnosticRecord.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100