Browse Source

add check for static function names

Karel Miko 8 years ago
parent
commit
8f433f1a36
1 changed files with 5 additions and 0 deletions
  1. 5 0
      helper.pl

+ 5 - 0
helper.pl

@@ -54,6 +54,11 @@ sub check_source {
       push @{$troubles->{unwanted_strcmp}},  $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
       push @{$troubles->{unwanted_clock}},   $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
       push @{$troubles->{unwanted_qsort}},   $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
+      if ($file =~ m|src/.*\.c$| &&
+          $file !~ m|src/math/.+_desc.c$| &&
+          $l =~ /^static\s+\S+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
+        push @{$troubles->{staticfunc_name}}, "$lineno($1)";
+      }
       $lineno++;
     }
     for my $k (sort keys %$troubles) {