PowerShell / PowerShell/vscode-powershell

Feature Request: Bring Invoke-PSScriptAnalyzer to PowerShell Command Palate

Aperta
#4,444 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area-Script Analysis Issue-Enhancement Up for Grabs
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
Summary

For day to day/line by line development the default PSScriptAnalyzer rules in VS Code work well and ensure that it doesn't slow down my development too much. There are however times when I would like to do a more thorough review of the code, for example before publishing remotely or presenting the code to others.

In this scenario, I would like to be able to easily run the full range of tests that PSScriptAnalyzer has without resorting to:

  • Modifying the everyday ruleset
  • Calling the command line directly

For me (and I suspect others) this would enhance discoverability of this great tool, speed up ad-hoc usage and therefore encourage a much greater usage of the non-realtime rulesets

Proposed Design

When I first attempted to do this I instinctively looked for an option in the PowerShell command list, in the same place as 'Run' and 'Run Pester Tests'
image

To cater for multiple rulesets my thought process would be to offer the following command structure:

  • PowerShell: Run PSScriptAnalyzer
    • Default RuleSet (Same as Invoke-PSScriptAnalyser Default RuleSet)
    • All Rules (All code and formatting rules)
    • Realtime Rules (The ruleset currently configured for real-time analysis)
    • Custom (Specify a PSScriptAnalyzer ruleset file)
      • Select Location

Brackets/Names are for explanation purposes rather than anticipated naming

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia individuando le implementazioni esistenti dei comandi VS Code per Run e Run Pester Tests, quindi traccia il modo in cui i comandi accedono allo script attivo e alle regole PSScriptAnalyzer configurate. Il lavoro è completato quando la tavolozza dei comandi espone opzioni per default, all, realtime e set di regole personalizzati, inclusa la selezione della posizione del set di regole personalizzato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, vscode
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.