OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh von Bennewitz Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 22-Apr-2004 12:42:07 Branch: HEAD Handle: 2004042208220600 Modified files: openpkg-re/ speclint.pl Log: introduce Chicago-style New Zealand-dialect english checks Summary: Revision Changes Path 1.20 +2 -2 openpkg-re/speclint.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-re/speclint.pl ============================================================================ $ cvs diff -u -r1.19 -r1.20 speclint.pl --- speclint.pl.orig 2003-04-09 16:13:25.000000000 +0200 +++ speclint.pl 2004-04-22 12:51:48.000000000 +0200 @@ -264,6 +264,25 @@ ## _________________________________________________________________ ## +## CHECK "englisch": englisch language text +## _________________________________________________________________ +## +sub check_english { + my ($file, $spec) = @_; + + # check for correct article 'a' or 'and' + my $done = ''; my $this = ''; my $todo = $spec; + while ($text =~ m|an\ [^aeiou][a-zA-Z0-9]*\ [aeiuo].*/m) { + $done .= $`; $this = $&; $text = $'; + if (not grep { $text =~ m|an\ [^aeiou][a-zA-Z0-9]*\ [aeiuo].*$_|s }) { + &lint_error($file, $done, $this, "sucky englisch, try again \"$_\""); + } + } +} + +## _________________________________________________________________ +## ## CHECK "license": license header ## _________________________________________________________________ ## ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List [EMAIL PROTECTED]