PowerShell / PowerShell/PSScriptAnalyzer
Additional settings file for developement
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
There is currently one PSScriptAnalyzerSettings.psd1 file shipped with the PSScriptAnalyzer but there are at least two use cases with a different requirement:
-
Design-time
During this phase (often done is VSCode or Visual Studio), any cutting-edge alert for a potential PowerShell pitfall is welcome. -
Continuous Integration
During this phase (e.g. in a CI/CD street), any change is supposed to passed the given tests.
Apparently, there is a (undocumented?) convention that our convention is to ship it opt-in via ConfigurableRule with Enable = false but that convention only satisfies the builder phase.
Proposed technical implementation details (optional)
Ship the PSScriptAnalyzer with an additional settings file that is focused on the development phase.
The "development" settings file might than be used as a default by e.g. VSCode (powershell.scriptAnalysis.settingsPath).
Caveats
- The settings file under VSCode "This setting may not work as expected currently!", see: https://github.com/PowerShell/vscode-powershell/issues/4653
- https://github.com/PowerShell/vscode-powershell/issues/5385? "Users keep getting bitten by the extension's effective defaults differing from Invoke-ScriptAnalyzer's defaults", I believe this isn't a feature but a bug, see: https://github.com/PowerShell/vscode-powershell/issues/5474
What is the latest version of PSScriptAnalyzer at the point of writing
1.25.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 con il file incluso PSScriptAnalyzerSettings.psd1 e l'impostazione di VSCode powershell.scriptAnalysis.settingsPath menzionata nell'issue. Confronta i requisiti di progettazione e CI, quindi determina le regole incentrate sullo sviluppo e come deve essere distribuito il file aggiuntivo. Il lavoro è completato quando è disponibile un file di impostazioni separato per lo sviluppo senza modificare il file di impostazioni esistente.
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à
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100