PowerShell / PowerShell/PSScriptAnalyzer

Write new formatting engine

Open
#1,480 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Consider - 2.0
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

PSSA2 currently only has an analyzer. It should also have a formatter.

In particular, the API should allow objects to implement an abstract class that doesn't emit diagnostics, but instead contributes edits to a formatting buffer.

Rules should be able to provide an implementation for this also by implementing an API that provides an instance of the required abstract class.

Requirements are:

  • Run as many formatters over the script as it can at once
  • When formatters want to overwrite the same extent, the largest wins
  • Attempt to run until no more formatters have edits to make, up to some maximum number of runs
  • Formatters should reuse the rule configuration system

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 by reading the existing analyzer and rule configuration system, then map how a formatter API could fit alongside them. Done means supporting formatter instances, concurrent edits with largest-overlap-wins behavior, repeated runs up to a limit, and reused rule configuration.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.