integrated-application-development / integrated-application-development/sonar-delphi
New rule: Method parameters should comply with a naming convention
- Dominant language
- Java
- Stars
- 159
- Forks
- 31
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 4
Description
### Prerequisites
- [x] This rule has not already been suggested.
- [x] This should be a new rule, not an improvement to an existing rule.
- [x] This rule would be generally useful, not specific to my code or setup.
### Suggested rule title
Method parameters should comply with a naming convention
### Rule description
This rule will check if a method parameter is in PascalCase and (optionally) has a certain prefix. The prefix will default to nothing.
### Rationale
It's a common Delphi convention to prefix arguments with `A`, like in the example below:
```delphi
procedure Example(AMyInt: string);
var
MyStr: string;
begin
// ...
end;
```
This would enforce this convention in the same way similar conventions are supported for other language constructs (type names, constant names, etc.).
Contributor guide
Assessment
This issue has not been assessed yet.