PowerShell / PowerShell/PowerShellEditorServices
Functions (and other logic) within Regions should be indented
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 767
- Fork
- 266
- Merge medio
- 3g 16h
- PR unite (30g)
- 1
Descrizione
Summary of the new feature / enhancement
Indentation should incoprorate Regions, if they exist. This logic is akin to why the contents of functions is indented.
Note: I have searched and found no support for this, and Found no better place to request this enhancement. I am using Visual Studio Code with the MS PowerShell Plugin. Language specific Editor settings do not support doing this: https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings
___ is used instead of spaces because the View of the issue removed spaces
Preferred:
================
Expanded:
Region Main
___Function Main {
______ValidateSettings
Collapsed:
Region Main
___Function Main {
___}
___Function Function1 {
___}
___Function Function2 {
___}
Current:
Expanded:
Region Main
Function Main {
_____ValidateSettings
Collapsed:
Region Main
Function Main {
_____ValidateSettings
}
Function Function1 {
}
Function Function2 {
}
Proposed technical implementation details (optional)
The Default Auto-Formatting should indent Functions when they exist within Regions.
Not preferred, as this is user by user: provide language-specific-editor-settings to enable this
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 individuando l'implementazione di formattazione automatica predefinita utilizzata dal servizio linguistico PowerShell e confrontala con gli esempi di Region espanso e compresso dell'issue. Verifica come viene attualmente indentato il contenuto delle funzioni, quindi determina come dovrebbe essere rappresentato l'annidamento di Region richiesto e convalida il comportamento tramite il percorso di test o verifica esistente del formatter, se presente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell
- 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