瀏覽代碼

Merge pull request #171 from infosiftr/travis-length

Update Travis to check -short.txt lengths too
Tianon Gravi 10 年之前
父節點
當前提交
f0034013e2
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      .travis.yml

+ 13 - 0
.travis.yml

@@ -10,6 +10,19 @@ install:
 script:
   - files="$(find -name '*.md' -print0 | xargs -0 markdownfmt -l)";
     if [ "$files" ]; then
+      echo >&2 "Need markdownfmt:";
       echo >&2 "$files";
       exit 1;
     fi
+  - failed='';
+    for short in */README-short.txt; do
+      chars="$(echo -n "$(cat "$short")" | wc -m)";
+      lines="$(cat "$short" | wc -l)";
+      if [ "$chars" -gt 100 -o "$lines" -gt 1 ]; then
+        failed+=" $short";
+      fi
+    done;
+    if [ "$failed" ]; then
+      echo >&2 "Too long (or too many lines):$failed";
+      exit 1;
+    fi