PowerShell / PowerShell/PSScriptAnalyzer

Add check for capitalization for reserved powershell words

Open
#767 2 comments 20 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

One thing i would like to see is rules that check case of reserved powershell words like function, if, switch, class, etc.

A setting should be available to enforce all lower, upper and proper case. Ideally this would drive a correction that could be used by VSCode to auto correct.

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 the existing analyzer rules and how PowerShell tokens are classified. Determine how a configurable lower, upper, or proper-case policy would work and whether VSCode correction support is in scope. Done means the requested capitalization checks, configuration, and correction behavior are defined and covered by the project's tests.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.