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

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

[elpa] externals/objed ea0be40 10/16: More work on lint tests


From: Clemens Radermacher
Subject: [elpa] externals/objed ea0be40 10/16: More work on lint tests
Date: Fri, 15 Mar 2019 12:57:42 -0400 (EDT)

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

    More work on lint tests
---
 Makefile            |  4 ++--
 test/make-lint.el   | 58 +++++++++++++++++++++++++++++++++++------------------
 test/make-update.el |  6 +++---
 3 files changed, 43 insertions(+), 25 deletions(-)

diff --git a/Makefile b/Makefile
index c74bd98..4426aef 100644
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,12 @@ update:
        $(EMACS) -Q -batch -l test/make-update.el
 
 lint:
-       $(EMACS) -Q -batch -l test/make-lint.el
+       $(EMACS) -Q -batch -l test/elpa.el -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
index 9de5080..353a257 100644
--- a/test/make-lint.el
+++ b/test/make-lint.el
@@ -1,28 +1,46 @@
 ;;; -*- 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 '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))
+;; (let ((success t))
+;;   (dolist (file (file-expand-wildcards "*.el"))
+;;     (with-temp-buffer
+;;       (insert-file-contents file t)
+;;       (emacs-lisp-mode)
+;;       (let ((checking-result (package-lint-buffer)))
+;;         (when checking-result
+;;           (setq success nil)
+;;           (message "In `%s':" file)
+;;           (pcase-dolist (`(,line ,col ,type ,message) checking-result)
+;;             (message "  at %d:%d: %s: %s" line col type message))))))
+;;   (kill-emacs (if success 0 1)))
 
 ;; elsa
 ;; (require 'elsa)
-;; (let ((output (with-output-to-string (elsa-run))))
-;;   (unless (string-empty-p output)
-;;     (princ output)
-;;     (error "Elsa issues detected")))
+;; (defun my-elsa-run ()
+;;   "Run `elsa-process-file' and output errors to stdout for flycheck."
+;;   (elsa-load-config)
+;;   (dolist (file (file-expand-wildcards "*.el"))
+;;     (--each (reverse (oref (elsa-process-file file) errors))
+;;       (princ (concat file ":" (elsa-message-format it))))))
+;; (my-elsa-run)
+
+
+
+
 
diff --git a/test/make-update.el b/test/make-update.el
index bbc6094..506e699 100644
--- a/test/make-update.el
+++ b/test/make-update.el
@@ -1,5 +1,5 @@
 ;; list of the all the dependencies, including the dev dependencies
-(defvar dev-packages '())
+(defvar dev-packages '(package-lint elsa))
 
 ;; initialize package.el
 (setq package-user-dir
@@ -7,8 +7,8 @@
 (message "installing in %s ...\n" package-user-dir)
 (package-initialize)
 (setq package-archives
-      '(("melpa" . "http://melpa.org/packages/";)
-        ("gnu" . "http://elpa.gnu.org/packages/";)))
+      '(("melpa" . "https://melpa.org/packages/";)
+        ("gnu" . "https://elpa.gnu.org/packages/";)))
 (package-refresh-contents)
 
 ;; install dependencies



reply via email to

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