PowerShell / PowerShell/PSScriptAnalyzer

Documentation for AvoidTrailingWhitespace shouldn't use bad practices for reasoning

Offen
#1,034 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Area - Documentation Issue - Discussion
Vorherrschende Sprache
C#
Sterne
2.2k
Forks
414
Ø Merge
13 Std. 1 Min.
Gemergte PRs (30 T.)
2

Beschreibung

from document file /RuleDocumentation/AvoidTrailingWhitespace.md:

Lines should not end with whitespace characters. This can cause problems with the line-continuation backtick, and also clutters up future commits to source control.

The backtick character is not a "line-continuation" character and using it as such is generally considered bad practice (for the exact reason noted in this document). I feel this shouldn't be listed as a reason for avoiding trailing whitespace since it's saying you should avoid one bad practice to prevent messing with another bad practice.

I feel this should be changed to either:

  1. Not refer to the backtick character as a "line-continuation character" since that's not what it is and call out this use as bad practice
  2. Explicitly call out that the use of the backtick character as a "line-continuation character" is considered bad practice
  3. Remove the reference to the use of the backtick character in the description entirely, since this usage should be avoided in the first place

What is the latest version of PSScriptAnalyzer at the point of writing
1.17.1

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Öffne RuleDocumentation/AvoidTrailingWhitespace.md und überprüfe die zitierte Erklärung zu nachgestellten Leerzeichen und dem Backtick-Zeichen. Entscheide, welche der drei Formulierungsänderungen am besten zu den Dokumentationsrichtlinien des Projekts passt, aktualisiere diese Passage und überprüfe, dass sie die Praxis korrekt beschreibt, ohne Backticks als Zeilenfortsetzungszeichen zu behandeln.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.