summary history branches tags files
commit:fb1d9ed12d5ec4282d22da0d7811e3dbe7caf133
author:Trevor Bentley
committer:Trevor Bentley
date:Fri Dec 11 00:30:43 2020 +0100
parents:9e2d34df492a4193b7321fde312e9d110f768fc4
add checkdot and byte-compiler to test script
diff --git a/test_snitch.sh b/test_snitch.sh
line changes: +42/-0
index 5a61091..de5471e
--- a/test_snitch.sh
+++ b/test_snitch.sh
@@ -1,6 +1,47 @@
 #!/bin/bash
 set -e
 
+LINT_FILES='
+  snitch.el
+  snitch-backtrace.el
+  snitch-custom.el
+  snitch-filter.el
+  snitch-log.el
+  snitch-timer.el'
+
+QUOTED_LINT_FILES=""
+for file in ${LINT_FILES}; do
+    QUOTED_LINT_FILES="$QUOTED_LINT_FILES \"$file\"";
+done
+
+#lint-compile:
+#  @if [ -n "${LINT_COMPILE_FILES}" ]; then \
+#    echo "# Run byte compilation on $(call split_with_commas,${MAKEL_LINT_COMPILE_FILES})…"; \
+#    ${BATCH} \
+#    --eval "(setq byte-compile-error-on-warn t)" \
+#    $(if ${LINT_COMPILE_OPTIONS},${LINT_COMPILE_OPTIONS}) \
+#    --funcall batch-byte-compile \
+#    ${MAKEL_LINT_COMPILE_FILES}; \
+#    fi
+
+echo "byte-compiling..."
+emacs -batch \
+      --eval "(package-initialize)" \
+      --eval "(setq load-path (seq-filter \
+                (lambda (x) (not (string-match \"/snitch\" x))) load-path))" \
+      --eval "(add-to-list 'load-path \"~/.emacs.d/snitch/\")" \
+      --eval "(require 'snitch)" \
+      --eval "(message \"Testing snitch version: %s\" (snitch-version))" \
+      --eval "(setq byte-compile-error-on-warn t)" \
+      --funcall batch-byte-compile \
+      ${LINT_FILES}
+
+echo "checkdoc..."
+# Just print findings, don't exit on errors
+emacs -batch \
+      --eval "(mapcar #'checkdoc-file (list ${QUOTED_LINT_FILES}))"
+
+echo "package-lint..."
 emacs -batch \
       --eval "(package-initialize)" \
       --eval "(setq load-path (seq-filter \
@@ -15,6 +56,7 @@ emacs -batch \
       snitch.el snitch-backtrace.el snitch-custom.el \
       snitch-filter.el snitch-log.el snitch-timer.el
 
+echo "ert tests..."
 emacs -batch \
       --eval "(package-initialize)" \
       --eval "(setq load-path (seq-filter \