PowerShell / PowerShell/PSScriptAnalyzer

Align groups of assignments (=)

Open
#1,029 14 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Formatter Up-for-Grabs
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

I made the below feature request in the vscode-powershell extension git and was enlightened that this functionality originate from the PSScriptAnalyzer module. https://github.com/PowerShell/vscode-powershell/issues/1385

I would love to see an option to allow alignment of assignmentgroups. Its easiest to show what I mean with an example. (Github wouldn't allow me to format the code manually and trimmed the whitespaces automatically so I had to attach a printscreen).

bild

So that '=' are aligned in columns within a group of assignments. A group could be interpreted as delimitered with a blank line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked vscode-powershell request and the attached assignment example to confirm the intended grouping and alignment behavior. The payload names no files or tests, so locate the relevant PSScriptAnalyzer formatter or analyzer entry point and define completion as aligned assignment operators within each blank-line-delimited group.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.