PowerShell / PowerShell/PSScriptAnalyzer
Allow modules to provide rules
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 414
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il comportamento documentato di CustomRulePath e MEF, quindi ispeziona ValidModPaths e GetValidCustomRulePaths() per comprendere l’attuale individuazione delle regole personalizzate. Chiarisci l’approccio previsto per l’individuazione o la configurazione dei moduli e definisci come le regole dei moduli disponibili debbano essere riconosciute come implementazioni di DiagnosticRecord.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100