aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-10-07 16:40:22 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-10-07 16:40:22 +0000
commit77327f1b6ff2fc1a19f529bcf2742f3ac31e91e5 (patch)
treebccc4a142fbdb04011430767e9cda23ae78b5f17 /tools
parenta7c4d6ea0615a5d9a3290e9744c9da8c6b0e2081 (diff)
Tighten the blurb regexp. Check for leading/trailing white space in blurbs. Check for any white space in the abbreviation.
svn path=/trunk/; revision=34405
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkAPIs.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl
index 07c2d32192..30c1d1832a 100755
--- a/tools/checkAPIs.pl
+++ b/tools/checkAPIs.pl
@@ -977,7 +977,7 @@ sub check_hf_entries($$)
\s*,\s*
([A-Z0-9x_]+) # bitmask
\s*,\s*
- (["A-Z0-9 '\./\(\)_:-]+) # blurb (optional, so quotes are not required)
+ ([NULL|"[A-Z0-9 '\./\(\)\?_:-]+"]) # blurb (NULL or a string)
\s*,\s*
HFILL # HFILL
}xgios);
@@ -996,10 +996,19 @@ sub check_hf_entries($$)
print STDERR "Warning: the blurb for field $name ($abbrev) matches the field name in $filename\n";
}
if ($name =~ m/"\s+/) {
- print STDERR "Warning: leading space in field $name ($abbrev) in $filename\n";
+ print STDERR "Warning: the name for field $name ($abbrev) has leading space in $filename\n";
}
if ($name =~ m/\s+"/) {
- print STDERR "Warning: trailing space in field $name ($abbrev) in $filename\n";
+ print STDERR "Warning: the name for field $name ($abbrev) has trailing space in $filename\n";
+ }
+ if ($blurb =~ m/"\s+/) {
+ print STDERR "Warning: the blurb for field $name ($abbrev) has leading space in $filename\n";
+ }
+ if ($blurb =~ m/\s+"/) {
+ print STDERR "Warning: the blurb for field $name ($abbrev) has trailing space in $filename\n";
+ }
+ if ($abbrev =~ m/\s+/) {
+ print STDERR "Warning: the abbreviation for field $name ($abbrev) has white space in $filename\n";
}
if ("\"".$hf ."\"" eq $name) {
print STDERR "Warning: name is the hf_variable_name in field $name ($abbrev) in $filename\n";