Skip to content

Commit 8f433f1

Browse files
karel-msjaeckel
authored andcommitted
add check for static function names
1 parent 27b3ffc commit 8f433f1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

helper.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ sub check_source {
5454
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
5555
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
5656
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
57+
if ($file =~ m|src/.*\.c$| &&
58+
$file !~ m|src/math/.+_desc.c$| &&
59+
$l =~ /^static\s+\S+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
60+
push @{$troubles->{staticfunc_name}}, "$lineno($1)";
61+
}
5762
$lineno++;
5863
}
5964
for my $k (sort keys %$troubles) {

0 commit comments

Comments
 (0)