PowerShell / PowerShell/PSScriptAnalyzer
Normalisation of new lines after pipes in expressions with 2 or more pipes
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
Consider the following
$List | Where-Object {
} |
ForEach-Object {
}
This is a formatted piece of PowerShell with the notable feature of using both no new line after the pipe and new line after the pipe. The new rule would normalise the presence of a new line after a pipe across the input data.
The rule would have the option to enforce new lines or enforce no new lines after a pipe.
For example,
$List | Where-Object {
} |
ForEach-Object {
}
would become
$List | Where-Object {
} | ForEach-Object {
}
If there only exists one pipe, then removing a Newline pending its line length could also be within the scope of the feature.
What is the latest version of PSScriptAnalyzer at the point of writing
PS > (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.19.1
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
Das Issue nennt keine Dateien, Tests oder Einstiegspunkte; beginne damit, den Formatter-Einstiegspunkt zu finden, der für die Behandlung von Zeilenumbrüchen nach Pipes zuständig ist. Verwende die bereitgestellten Beispiele mit gemischten Zeilenumbrüchen, um die erwartete Normalisierung festzulegen, und kläre, ob die Regel für einzelne Pipes und Zeilenlängenbeschränkungen gilt. Erledigt ist die Aufgabe, wenn die ausgewählte Enforcement-Option eine konsistente Ausgabe erzeugt und ihr Verhalten durch Tests abgedeckt ist.
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