summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-02-06 22:47:44 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-02-06 22:47:44 +0000
commitd236e3a3324b5ba1e49af294bd5321061b76b178 (patch)
treeb575b2222df4d0e0d197d8deea5c5cec80483ff7
parent564fc0e4a41d31e1abf872ba2052b0d8c3a3e20a (diff)
downloadocaml-d236e3a3324b5ba1e49af294bd5321061b76b178.tar.gz
tweak tools/check-typo
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/new-test-framework@15819 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rwxr-xr-xtools/check-typo9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/check-typo b/tools/check-typo
index bd48dc7a3e..b5037143aa 100755
--- a/tools/check-typo
+++ b/tools/check-typo
@@ -38,6 +38,8 @@
# - Any file whose name matches one of the following patterns is
# automatically exempt from all rules
# *.reference
+# *.out
+# *.err
# */reference
# */.depend*
# - Any file whose name begins with "Makefile" is automatically exempt
@@ -53,6 +55,7 @@
# - Any file whose name matches the following pattern is automatically
# exempt from the "long-line" rule (but not from "very-long-line").
# */ocamldoc/*
+# - An empty file is exempt from the missing-header rule.
# ASCII characters are bytes from 0 to 127. Any other byte is
# flagged as a non-ASCII character.
@@ -139,7 +142,7 @@ IGNORE_DIRS="
Makefile*|*/Makefile*) rules="tab,$rules";;
*/.ignore) add_hd;;
*.mlpack|*.mllib|*.mltop|*.odocl|*.itarget|*.clib) add_hd;;
- *.reference|*/reference|*/.depend*) continue;;
+ *.reference|*.out|*.err|*/reference|*/.depend*) continue;;
esac
case "$f" in
ocamldoc/*|*/ocamldoc/*) rules="long-line,$rules";;
@@ -169,7 +172,7 @@ IGNORE_DIRS="
err("non-ascii", "non-ASCII character(s)");
}
- match($0, /[^\t\200-\377 -~]/) {
+ match($0, /[^\t\200-\377 -}~]/) {
err("non-printing", "non-printing ASCII character(s)");
}
@@ -223,7 +226,7 @@ IGNORE_DIRS="
NR = 1;
RSTART = 1;
RLENGTH = 0;
- if (!(header_ocaml && header_copyright)){
+ if (!empty_file && !(header_ocaml && header_copyright)){
err("missing-header", "missing copyright header");
}
split(svnrules, r, "[, ]");