integrated-application-development / integrated-application-development/sonar-delphi
Add ignore keyword list to CommentedOutCode
- Dominant language
- Java
- Stars
- 159
- Forks
- 31
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 4
Description
### Prerequisites
- [X] This improvement has not already been suggested.
- [X] This improvement should not be implemented as a separate rule.
### Rule to improve
CommentedOutCode
### Improvement description
CommentedOutCode detects code in comments like:
`foo.CheckCondition({var}param);
`
I'd like this {var} not to match with this rule.
### Rationale
We often use {var} comment to indicate the 'param' may be chanegd.
In this case, CheckCondition function is defined blow:
```
procedure CFoo.CheckCondition(var ACode: Integer);
begin
// do something
end;
```
On the other hand, this {var} may be a code to be detected.
So, I wish I could add an Ignore-Keyword-List to CommentedOutCode rule.
{out} is also frequently used for the same reason.
Contributor guide
Assessment
This issue has not been assessed yet.