PowerShell / PowerShell/PSScriptAnalyzer
Revise semantics of compatibility rule profile inclusion
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
UseCompatibleCommands and UseCompatibleTypes create a "union" profile for comparison of target profiles to a base standard. This allows us to use simple heuristic to determine whether a PowerShell AST represents something that is platform-specific (we see if the command or type is available in any platform, and if not ignore it as user-defined).
The problem here is that to create good warnings we have to have a good baseline union profile. Meaning we need to be judicious about how we make the profile. But since we could get it wrong, I created an informal mechanism for including things into the union profile. We use all the profiles in the "profile directory" and nothing else:
This means that:
- Including only one target, you still get good warnings, because it's compared against all the other profiles we ship by default
- Using a target not in the profile directory, that won't be included in the union comparison
- You can configure a different profile directory to get rid of comparisons to PowerShells you don't care about
This works but it's a bit subtle. I think we should move to:
- All targets are in the union by default
- Targets in the profile directory are in the union by default
- Targets can be excluded from the union in a configuration setting, by name or path
- The profile directory automatic union inclusion can be turned off by default
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 CompatibilityProfileLoader.cs, especialmente con la lógica de carga del directorio de perfiles vinculada en el issue, y sigue cómo UseCompatibleCommands y UseCompatibleTypes construyen el perfil de unión. Define el comportamiento de configuración y exclusión para destinos con nombre o basados en rutas, así como para deshabilitar la inclusión automática del directorio de perfiles. Se considera completado cuando todos los destinos se incluyen de forma predeterminada y se respetan las exclusiones configuradas y la opción de exclusión voluntaria.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, powershell
- Área
- devtools, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100