X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9184c51a9a5f8753b7b973fd6cb56c96946d97c8..94301a3fdb8be507e1c9fa0c1f7a21ab836cb2e1:/tools/internal/spell_comments.pl diff --git a/tools/internal/spell_comments.pl b/tools/internal/spell_comments.pl index c9659d33f6..ceea60d83c 100755 --- a/tools/internal/spell_comments.pl +++ b/tools/internal/spell_comments.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Copyright (c) 2013-2015. The SimGrid Team. +# Copyright (c) 2013-2019. The SimGrid Team. # All rights reserved. # This program is free software; you can redistribute it and/or modify it @@ -30,8 +30,8 @@ $DICTFILE="./spell_dict.txt" unless (-e $DICTFILE); die "Call this script from its location or from the SimGrid root directory\n" unless (-e $DICTFILE); die "Usage: ". ($DICTFILE eq "./spell_dict.txt"? "./":"tools/internal/")."spell_comments.pl " - ."`find ". ($DICTFILE eq "./spell_dict.txt"? "../../":".")." -name '*.[ch]' -o -name '*.hpp' -o -name '*.cpp' |grep -v umpire|grep -v smpi/mpich3-test|grep -v NAS`\n" - unless scalar(@ARGV)>1; + ."`find ". ($DICTFILE eq "./spell_dict.txt"? "../../":".")." -name '*.[ch]' -o -name '*.hpp' -o -name '*.cpp' |grep -v umpire|grep -v smpi/mpich3-test|grep -v NAS | grep -v src/smpi/colls`\n" + unless scalar(@ARGV)>0; my $total = 0; foreach my $file (@ARGV) { @@ -47,14 +47,14 @@ foreach my $file (@ARGV) { open(PIN, "ispell -d american -p $DICTFILE -l < $TEMPFILE | sort -uf |") || die; my @badwords; while (my $err = ) { - chomp $err; + chomp $err; push(@badwords, $err) if ($err =~ /\w/ && length($err)>0); } close(PIN) || die; if (@badwords) { print "$file: ".scalar(@badwords)." errors: '".join("','",@badwords)."'\n"; - $total += scalar(@badwords); + $total += scalar(@badwords); } }