PowerShell / PowerShell/PSScriptAnalyzer
Enable enforcing consistent casing
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
Summary of the new feature
PowerShell code used in official examples and VS Code code generation seems to follow some basic casing conventions:
- PascalCase for
- cmdlets
- parameters
- constants
- lowercase for
- operators
- statements (
if,foreach, etc)
- camelCase for
- local variables
- casing of module names and .NET types, enum values, etc consistent with their original case-sensitive casing
I would like to optionally enforce these casing conventions with PSScriptAnalyzer.
Proposed technical implementation details (optional)
I would like to enable rules in my PSScriptAnalyzerSettings.psd1 that enforce the casing rules above and autofix casing issues.
What is the latest version of PSScriptAnalyzer at the point of writing
1.18.2
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
Start by reviewing the issue's proposed casing conventions and how PSScriptAnalyzer settings enable rules. Done should include optional enforcement for the listed casing categories and autofix support, with behavior for original-case module names and .NET types defined.
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
- Needs clarification
- Newbie friendliness
- 25/100