-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
Rule ForbiddenComment - regexp support #959
Comments
There's no need to prefix a ticket with TODO. Hence I'd just reference the ticket and leave the todo as is. A ticket implies that there is something missing. |
@vanniktech makes sense. I guess I can adjust IDEA to show such comments in the same way it shows TODOs. I'll leave this ticket open if someone has other ideas, but feel free to close it. |
Maybe this warrants a different issue, but I came across this while looking for similar support for the ForbiddenImport rule. I want to forbid uses of JUnit 4 classes (which are under Having some means to flag that a particular value in a csv list should be treated as a regex seems like one possibility? |
That might be a new rule, feel free to open an issue for that. It will need reference solving which is not yet used in detekt though. |
Is there any way to suppress suppress
|
I agree with @mikekudzin and @AndreiZaitcev here. |
I think that the rule
ForbiddenComment
is not flexible enough. In my case I'd like to flag every usage ofTODO,TODO:,etc...
but if it contains a ticket number then it should pass the check.Noncompliant code:
Compliant code:
The main difference for me is that I can disallow usage of TODOs unless a task is tracked in any task system.
Does it make sense to have something like that in Detekt or I should create a custom rule?
The text was updated successfully, but these errors were encountered: