emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/objed 0e66e81 09/16: Add linting target


From: Clemens Radermacher
Subject: [elpa] externals/objed 0e66e81 09/16: Add linting target
Date: Fri, 15 Mar 2019 12:57:41 -0400 (EDT)

branch: externals/objed
commit 0e66e81f1721fd03b2875286c58a144d3ad7f59c
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Add linting target
---
 Makefile          |  5 ++++-
 test/make-lint.el | 28 ++++++++++++++++++++++++++++
 test/make-test.el |  1 +
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fe09640..c74bd98 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,13 @@ EMACS = emacs
 update:
        $(EMACS) -Q -batch -l test/make-update.el
 
+lint:
+       $(EMACS) -Q -batch -l test/make-lint.el
+
 compile: clean
        $(EMACS) -Q -batch -l test/elpa.el -l test/make-compile.el
 
-test: compile
+test: compile 
        $(EMACS) -Q -batch -l test/elpa.el -l test/make-test.el
 
 clean:
diff --git a/test/make-lint.el b/test/make-lint.el
new file mode 100644
index 0000000..9de5080
--- /dev/null
+++ b/test/make-lint.el
@@ -0,0 +1,28 @@
+;;; -*- lexical-binding: t; -*-
+
+;; checkdoc tests
+(require 'checkdoc)
+(let ((guess-checkdoc-error-buffer-name "*Warnings*"))
+  ;; This buffer name is hard-coded in checkdoc and it may change
+  (ignore-errors
+    (kill-buffer guess-checkdoc-error-buffer-name))
+  (mapc (lambda (f)
+          (checkdoc-file f))
+        (file-expand-wildcards "*.el"))
+  (when-let ((buf (get-buffer guess-checkdoc-error-buffer-name)))
+    (with-current-buffer buf
+      (unless (= 0 (buffer-size))
+        (kill-emacs 1)))))
+
+
+;; package lint
+;; (require 'package-lint)
+;; (package-lint-batch-and-exit))
+
+;; elsa
+;; (require 'elsa)
+;; (let ((output (with-output-to-string (elsa-run))))
+;;   (unless (string-empty-p output)
+;;     (princ output)
+;;     (error "Elsa issues detected")))
+
diff --git a/test/make-test.el b/test/make-test.el
index 34751c5..0f5380b 100644
--- a/test/make-test.el
+++ b/test/make-test.el
@@ -11,4 +11,5 @@
   (load (expand-file-name project-tests-file project-test-path))
 
   ;; run the tests
+  ;; (buttercup-run-discover))
   (ert-run-tests-batch-and-exit))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]