PowerShell / PowerShell/PSScriptAnalyzer
PipelineIndentation: when not set to NoIndentation: does not cater for case where line continuation token is used instead of pipeline (->missing indentation)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
foo `
-bar |
baz
foo `
# comment
-bar |
baz
Expected behavior
Calling Invoke-Formatter on it (PipelineIndentation is not NoIndentation, which is not the default), then baz should be indented twice (once because of the previous backtick and once because of the rule itself. It only gets indented once
foo `
# comment
-bar |
baz
Actual behavior
foo `
# comment
-bar |
baz
If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *
Environment data
PSSA 1.18,1 or latest version of master
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the examples with Invoke-Formatter using PipelineIndentation rather than NoIndentation, including the backtick continuation and comment. Trace the PipelineIndentation formatting path and verify that baz receives both indentation levels, matching the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100