Skip to content

Commit fbd3f84

Browse files
committed
Suppress UNCOMMENTED_DEFINITION check for operator()
It's often used as a callback.
1 parent db5358b commit fbd3f84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: checkpatch.pl

+2
Original file line numberDiff line numberDiff line change
@@ -4655,6 +4655,8 @@ sub process {
46554655
# ignore tests
46564656
} elsif ($realfile =~ /\bbox\.h$/ && $line =~ /^\+\s*(?:$Declare)?\s*box_set_/) {
46574657
# ignore box_set_XXX in box.h
4658+
} elsif ($line =~ /\boperator\s*()/) {
4659+
# operator() is used as a callback so a comment isn't necessary
46584660
} elsif ($line =~ /^\+\s*(?:$Declare)?\s*(?:generic_|disabled_|exhausted_)/) {
46594661
# generic_XXX, disabled_XXX, exhausted_XXX are functions are stubs so comments are not required
46604662
} elsif ($line =~ /^\+\s*($Declare)?\s*(?:($Ident)\s*\(|\(\s*\*\s*($Ident)\s*\)\s*\(|($Ident)\s*;)/) {

0 commit comments

Comments
 (0)