Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule to validate that recommended Pascal-Kebab-Case was used for function naming #2071

Open
IVNSTN opened this issue Mar 3, 2025 · 3 comments

Comments

@IVNSTN
Copy link

IVNSTN commented Mar 3, 2025

Pascal-Kebab-Case

There is a recommended notation for naming methods in Powershell script but no validation available. It would be great if PSScriptAnalyzer could catch names in different notations.

What is the latest version of PSScriptAnalyzer at the point of writing

1.23.0

@bergmeister
Copy link
Collaborator

The rules used by the formatter can also be used for analysis. You can specify the used rules in Invoke-ScriptAnalyzer with -IncludeRules parameter or specify one of the built in formatting sets with -Settings (e.g. -Settings CodeFormattingAllman)

@IVNSTN
Copy link
Author

IVNSTN commented Mar 13, 2025

@bergmeister can you please name the formatter rule which can be used in the way you described?

@bergmeister
Copy link
Collaborator

Ok, can you maybe give an example? Maybe I answered too quick thinking its about formatting design but now that I re-read your issue, not sure any more. Do you mean for cmdlet names to be of the Foo-Bar pattern or variable names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants