Skip to content

Enable enforcing consistent casing #1332

Open
@chriskuech

Description

@chriskuech

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions