diff options
| author | fukachan <fukachan> | 2002-01-13 22:06:34 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-01-13 22:06:34 +0000 |
| commit | ae533ef7247ad8c17c338c8fd77ef90bf169e285 (patch) | |
| tree | a45f15be5bc0850c684d842768bc95e6fc31cfcb | |
| parent | 928fa8d014b1da408d84bb0ff81837fb62f2782d (diff) | |
| download | fml8-ae533ef7247ad8c17c338c8fd77ef90bf169e285.tar.gz fml8-ae533ef7247ad8c17c338c8fd77ef90bf169e285.tar.bz2 fml8-ae533ef7247ad8c17c338c8fd77ef90bf169e285.zip | |
fundamental diagnostics for code
| -rwxr-xr-x | regress/simulation/stylecheck | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/regress/simulation/stylecheck b/regress/simulation/stylecheck new file mode 100755 index 00000000..a86d762f --- /dev/null +++ b/regress/simulation/stylecheck @@ -0,0 +1,53 @@ +#!/usr/bin/env perl +# +# $FML$ +# + +use strict; +use Carp; + +my $in_perldoc = 0; +my $package = ''; +my $fn = ''; +my $PrevARGV = ''; +my $num_file = 0; + +while (<>) { + next if /^\#/; + + if ($ARGV ne $PrevARGV) { + $in_perldoc = 0; + $package = ''; + $fn = ''; + $PrevARGV = $ARGV; + $num_file++; + print STDERR "reset $num_file $ARGV\n" if $ENV{'debug'}; + } + + $in_perldoc = 1 if /^=/; + + if (/^package (\S+);/) { + $package = $1; + next; + } + + if (/^=cut/) { + $in_perldoc = 0; + next; + } + + if (/^sub (\S+)/) { + $fn = $1; + + if ($in_perldoc) { + print STDERR "${package}::$fn is in document ???\n"; + } + else { + print STDERR "${package}::$fn is ok\n" if $ENV{'debug'}; + } + } + + if (/^1\;\s*$/ && $in_perldoc) { + print STDERR "${package} ends in document ???\n"; + } +} |
