Skip to content

Commit

Permalink
Suppress UNCOMMENTED_DEFINITION check for disabled_XXX and exhausted_XXX
Browse files Browse the repository at this point in the history
We name function stubs this way.
  • Loading branch information
locker committed Aug 15, 2022
1 parent 4664034 commit db5358b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4655,8 +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 =~ /^\+\s*(?:$Declare)?\s*generic_/) {
# generic_XXX functions are stubs so comments are not required
} 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*;)/) {
# function, function pointer, variable / struct member
my $decl = $1;
Expand Down

0 comments on commit db5358b

Please sign in to comment.