summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-09-25 14:33:24 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-09-25 14:33:24 +0100
commit16abaf45febe5f391cff053e955278374553d279 (patch)
tree4c245377a138adeb91c321b62fa7d7dbdb792270 /test
parent9461c4a300fe713d0319f2fdaf59d073428d61fd (diff)
Add a test for check-declares
This same test can easily be used to run checkdoc, we only need to make CIDER comply with checkdoc first.
Diffstat (limited to 'test')
-rw-r--r--test/cider-checks.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/cider-checks.el b/test/cider-checks.el
new file mode 100644
index 00000000..81744ac0
--- /dev/null
+++ b/test/cider-checks.el
@@ -0,0 +1,19 @@
+;; This is a script to be loaded from the root CIDER directory. It will prepare
+;; all requirements and then run `check-declare-directory' on
+;; `default-directory'. For example:
+;; emacs -Q --batch -l test/cider-checks.el
+
+;; This assumes that all CIDER dependencies are already on the package dir
+;; (probably from running `cask install').
+
+(add-to-list 'load-path (expand-file-name "./"))
+(require 'package)
+(require 'check-declare)
+(package-initialize)
+(let ((files (directory-files default-directory t
+ "\\`[^.].*\\.el\\'" t)))
+ ;; We need to fix checkdoc warnings before we can use this.
+ ;; (dolist (file files)
+ ;; (checkdoc-file file))
+ (when (apply #'check-declare-files files)
+ (kill-emacs 1)))