PowerShell / PowerShell/PSScriptAnalyzer

Formatter rules list is hard-coded

Open
#1,282 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is technical debt.

The formatter has a list of hard-coded rules, and it can only execute those. It should be refactored to enable the run-time specification of rules via settings. However, more research is needed to determine is there is a necessary reason the rules are hard-coded. See https://github.com/PowerShell/PSScriptAnalyzer/pull/1277#issue-293099518 and https://github.com/PowerShell/PSScriptAnalyzer/pull/1277#issuecomment-508929230 for more details.

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 reviewing pull request #1277 and its linked discussion to understand why the formatter rules are hard-coded. Determine whether runtime rule specification through settings is safe and what scope the refactor requires. Done means the runtime configuration approach and its implementation and validation requirements are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.