PowerShell / PowerShell/PSScriptAnalyzer
Autoformat option to automatically wrap object properties in single quotes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 2.2k
- Forks
- 414
- Ø Merge
- 13 Std. 1 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Summary of the new feature
I prefer to have all $Object.'properties' wrapped in single quotes.
- Makes it easy to see whats a property and whats a method.
- Uniformity for all properties: Properties with characters like whitespace must be wrapped in single or double quotes.
Today I do this manually. Would be awesome with an autoformat rule that wraps properties into string single quotes.
Proposed technical implementation details (optional)
Before autoformat:
$Object.property
$Object.method()
After autoformat:
$Object.'property'
$Object.method()
What is the latest version of PSScriptAnalyzer at the point of writing
v1.24.0
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es ist weder eine Datei noch ein Test-Einstiegspunkt angegeben; beginne damit, die Formatter-Implementierung von PSScriptAnalyzer und die vorhandenen Autoformatierungsregeln zu finden. Verwende die Vorher-/Nachher-Beispiele des Issues, um das erwartete Verhalten zu bestimmen, und überprüfe, dass Property-Zugriffe einfache Anführungszeichen erhalten, während Methodenaufrufe unverändert bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- powershell
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100