Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Add PSSA test for camelCase/PascalCase for variables and parameters #303

Open
fredleejr opened this issue Oct 16, 2018 · 2 comments
Open
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@fredleejr
Copy link

Details of the problem, bug, or enhancement

Many projects follow camelCase and PascalCase style guidelines and are often missed when reviewing. A custom rule for this would be very helpful. I understand a perfect solution would not be possible, but something to catch the obvious.

Verbose logs showing the problem (if applicable)

Suggested solution to the issue

I am currently working on 2 custom rules for this for our project. It is continuing what was started here:

https://github.com/MathieuBuisson/PowerShell-DevOps/tree/master/CustomPSScriptAnalyzerRules

These would be useful as "opt-in" rules that are potentially not enabled by default.

@stale
Copy link

stale bot commented Nov 15, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 15, 2018
@johlju
Copy link
Contributor

johlju commented Dec 7, 2018

I'm all for this, if the custom PSSA rules detect that parameter variable names uses PascalCase (both in the parameter declaration and in the code), and another PSSA rule detect other variables (in local, script and global scope) uses camelCase.

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 7, 2018
@PlagueHO PlagueHO added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants