Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the tool to spellcheck the comments
[simgrid.git] / tools / spell / lspell.pl
diff --git a/tools/spell/lspell.pl b/tools/spell/lspell.pl
deleted file mode 100644 (file)
index ef09839..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/perl
-
-# C comment spell checker
-# For each given source file, print the filename, a colon, and the number
-# of misspelled words, then a list of misspelled words.
-# Words contained in the file stopwords.txt are not considered spelling errors.
-# Copyright 2003, Dan Kegel.  Licensed under GPL.  See the file ../COPYING for details.
-
-sub check_content($) {
-       my $content = shift;
-       $content =~ tr/*/ /;
-       print POUT "$content\n";
-}
-
-$TEMPFILE="/tmp/spell.tmp";
-$STOPFILE=shift(@ARGV);
-
-open(STOPFILE, $STOPFILE) || die "can't open stopword file $STOPFILE";
-while (<STOPFILE>) {
-       chomp;
-       $stopped{$_}++;
-}
-close(STOPFILE);
-
-foreach $file (@ARGV) {
-       open (FI, $file) || die $file;
-       $content = join ("", <FI>);
-       close (FI);
-
-       open(POUT, "> $TEMPFILE") || die;
-       $content =~ s!//(.+)$!check_content($1)!egm;
-       $content =~ s!/\*(.+?)\*/!check_content($1)!egs;
-       close(POUT);
-
-       open(PIN, "ispell -d american -l < $TEMPFILE | sort -uf |") || die;
-       undef @badwords;
-       while (<PIN>) {
-               chomp;
-               if ($stopped{$_} == 0) {
-                       push(@badwords, $_);
-               }
-       }
-       close(PIN) || die;
-
-       if (@badwords) {
-               print "$file: ".scalar(@badwords)."\n\n";
-               print join(" ",@badwords)."\n\n";
-       }
-}