X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=blobdiff_plain;f=common%2Fscripts%2Fgblint.pl;h=afde47c303dff9a59007c67da95e0c35f1fc1ef2;hp=c8245031d81d005f8b7fbb8f1f1c459154b857b0;hb=HEAD;hpb=f4bdee5083ca9a72713637e1e979aa183e06faea diff --git a/common/scripts/gblint.pl b/common/scripts/gblint.pl index c824503..afde47c 100755 --- a/common/scripts/gblint.pl +++ b/common/scripts/gblint.pl @@ -70,6 +70,13 @@ my %sectionDocLookup = ( 'howcarry' => 'equipmnt', 'howmuch' => 'equipmnt', 'howuse' => 'equipmnt', + 'backpack' => 'equipmnt', + 'ammpouch' => 'equipmnt', + 'medikit' => 'equipmnt', + 'canteen' => 'equipmnt', + 'weapons' => 'weapons', + 'close' => 'weapons', + 'missile' => 'weapons', 'cmbtrulz' => 'cmbtrulz', 'evasion' => 'cmbtrulz', 'lorecrcl' => 'lorecrcl', @@ -167,10 +174,14 @@ while( $#ARGV > -1 && $ARGV[ 0 ] =~ /^-/ ) { shift @ARGV; $language = shift @ARGV; } + elsif( $ARGV[ 0 ] eq '-h' ) { + usage(); + exit 0; + } } my $lineNumber = 1; -my $currentSection = "_unknown"; +my $currentSection = ''; while( my $line = <> ) { my @section = ( $line =~ /]+id="([^"]*)"/g ); @@ -182,6 +193,7 @@ while( my $line = <> ) { else { $currentSection = $sectionDocLookup{$section[ 0 ]}; } + $currentSection = '_unknown' unless defined $currentSection; } if( $skipLines >= $lineNumber ) { @@ -223,7 +235,7 @@ while( my $line = <> ) { # ellipsis if( $line =~ /(\.\s*\.(\s*\.)?)/ ) { &printError( "ne", $currentSection, $lineNumber, "possible malformed ellipsis", "$1", " or " ); } - if( $line =~ m{([[:space:]])} || $line =~ m{([[:space:]])} ) { &printError( "ne", $currentSection, $lineNumber, " with extraneous surrounding space", "$1", "" ); } + if( $line =~ m{([[:space:]])}) { &printError( "ne", $currentSection, $lineNumber, " with extraneous surrounding space", "$1", "" ); } if( $line =~ m{([^>])()} ) { &printError( "ne", $currentSection, $lineNumber, "possible used in place of ", "$1$2", "$1" ); } if( $line =~ m{(>)} ) { &printError( "ne", $currentSection, $lineNumber, "possible used in place of ", "$1", ">" ); } @@ -271,7 +283,7 @@ while( my $line = <> ) { if( $line =~ /[^>](CLOSE\sCOMBAT\sSKILL)/ || $line =~ /(CLOSE\s+COMBAT\s+SKILL)[^<]/ ) { &printError( "ne", $currentSection, $lineNumber, "possible missing markup", "$1", "$1" ); } - if( $line =~ /[^>](ENDURANCE)/ || $line =~ /(ENDURANCE)[^<]/ ) { + if( $line =~ /[^>](ENDURANCE)/ || $line =~ /(ENDURANCE)(?! Points)[^<]/ ) { &printError( "ne", $currentSection, $lineNumber, "possible missing markup", "ENDURANCE", "ENDURANCE" ); } if( $line =~ /[^>](WILLPOWER)/ || $line =~ /(WILLPOWER)[^<]/ ) { @@ -287,7 +299,7 @@ while( my $line = <> ) { } ##### Others - if( $line =~ m{