PowerShell / PowerShell/PSScriptAnalyzer
Ability to bind concerned PowerShell version to a rule
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 414
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Descrizione
It might be helpful that in the case a rule only applies to a specific (minimum) PowerShell versions as for e.g.:
And new request/issues:
to have the possibility to add that (minimum) PowerShell version (e.g. MininumPowerShellVersion) to that rule.
Meaning e.g. the AvoidUsingWMICmdlet rule might have MininumPowerShellVersion set to 3.0
This would add the possibility for two additional features:
- Suppressing the specific rule by using the
#Requires -Version x.xstatement.
E.g.:- adding
#Requires -Version 2.0would suppress theAvoidUsingWMICmdletrule - adding
#Requires -Version 7.0would allow the use of`e(suppress the proposedUseCompatibleStringsrule)
- adding
- A general
UseRequiresStatementrule when a rule with a minimal version applies and the#Requires -Version x.xis not set (or set incorrectly)
E.g. if any of the rules applies, it generate a warning that the#Requires -Version x.xstatement should be set.
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 leggendo la documentazione della regola AvoidUsingWMICmdlet e le issue collegate UseCompatibleStrings, UseCompatibleSyntax e AvoidNewObjectCmdlet. Poi traccia il modo in cui vengono rappresentate le regole e come viene gestito #Requires -Version. Il lavoro è completo quando il comportamento proposto per la versione minima, la soppressione e il comportamento di UseRequiresStatement hanno un ambito di implementazione definito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell
- Ambito
- devtools
- 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