Skip to content

no-misleading-backtick

PowerShellcorrectnessno fixdefault: warn

Reports a backtick that is followed by blanks before the end of the line.

The backtick continues a line only when it is the last character. With a space after it, the backtick escapes the space, the line is not continued, and the next line runs as a separate command. The space is invisible in an editor.

To fix, remove the blanks after the backtick, or avoid the backtick with splatting or a bracketed expression.

Reported
Get-ChildItem `
-Force `
-Name
$x = 1 + `
2
powershell:
lint:
rules:
no-misleading-backtick: warn # off, warn (default), error

Suppress one line with sudsy-disable-next-line no-misleading-backtick in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
psscriptanalyzer PSMisleadingBacktick full