Skip to content

Commit

Permalink
Suppress UNCOMMENTED_DEFINITION check for operator()
Browse files Browse the repository at this point in the history
It's often used as a callback.
  • Loading branch information
locker committed Aug 16, 2022
1 parent db5358b commit fbd3f84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4655,6 +4655,8 @@ sub process {
# ignore tests
} elsif ($realfile =~ /\bbox\.h$/ && $line =~ /^\+\s*(?:$Declare)?\s*box_set_/) {
# ignore box_set_XXX in box.h
} elsif ($line =~ /\boperator\s*()/) {
# operator() is used as a callback so a comment isn't necessary
} elsif ($line =~ /^\+\s*(?:$Declare)?\s*(?:generic_|disabled_|exhausted_)/) {
# generic_XXX, disabled_XXX, exhausted_XXX are functions are stubs so comments are not required
} elsif ($line =~ /^\+\s*($Declare)?\s*(?:($Ident)\s*\(|\(\s*\*\s*($Ident)\s*\)\s*\(|($Ident)\s*;)/) {
Expand Down

0 comments on commit fbd3f84

Please sign in to comment.