#!/usr/bin/env perl
-# Copyright (c) 2013-2015. The SimGrid Team.
+# Copyright (c) 2013-2022. The SimGrid Team.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify it
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"
+ ."`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;
open(PIN, "ispell -d american -p $DICTFILE -l < $TEMPFILE | sort -uf |") || die;
my @badwords;
while (my $err = <PIN>) {
- 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);
}
}