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 ignore keyword list to CommentedOutCode #309

Open
2 tasks done
wdken opened this issue Oct 30, 2024 · 2 comments
Open
2 tasks done

Add ignore keyword list to CommentedOutCode #309

wdken opened this issue Oct 30, 2024 · 2 comments
Labels
enhancement Improvements to an existing feature rule Improvements or additions to rules triage This needs to be triaged by a maintainer

Comments

@wdken
Copy link

wdken commented Oct 30, 2024

Prerequisites

  • This improvement has not already been suggested.
  • 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.

@wdken wdken added enhancement Improvements to an existing feature rule Improvements or additions to rules triage This needs to be triaged by a maintainer labels Oct 30, 2024
@zaneduffield
Copy link
Collaborator

A possible (simpler) alternative condition for exclusions from the rule would be a minimum comment length.

@wdken
Copy link
Author

wdken commented Oct 30, 2024

That's nice!
I agree with the minimum comment length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to an existing feature rule Improvements or additions to rules triage This needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants