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

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

[nongnu] elpa/parseclj 343052c01a 014/185: Add linting to the build


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj 343052c01a 014/185: Add linting to the build
Date: Tue, 28 Dec 2021 14:05:09 -0500 (EST)

branch: elpa/parseclj
commit 343052c01a6038a62239ee65415853c10270ad4d
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Arne Brasseur <arne@arnebrasseur.net>

    Add linting to the build
---
 .travis.yml              |  5 +++++
 clj-parse-test-runner.el | 17 ++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 86e0be717e..a233d11372 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,11 @@ language: emacs-lisp
 env:
   - EMACS=emacs-24.3 PPA=ppa:ubuntu-elisp PACKAGE=emacs-snapshot
   - EMACS=emacs-25.1 PPA=ppa:kelleyk/emacs PACKAGE=emacs25
+  - EMACS=emacs-25.1 PPA=ppa:kelleyk/emacs PACKAGE=emacs25 CLJ_PARSE_LINT=true
+
+matrix:
+  allow_failures:
+    - env: EMACS=emacs-25.1 PPA=ppa:kelleyk/emacs PACKAGE=emacs25 
CLJ_PARSE_LINT=true
 
 before_install:
   - sudo add-apt-repository -y $PPA
diff --git a/clj-parse-test-runner.el b/clj-parse-test-runner.el
index c6e5449ad8..f14bfb9723 100644
--- a/clj-parse-test-runner.el
+++ b/clj-parse-test-runner.el
@@ -13,6 +13,8 @@
 (when (not (fboundp 'let-alist))
   (package-install 'let-alist))
 
+(package-install 'package-lint)
+
 (require 'ert)
 
 ;; Tried
@@ -22,4 +24,17 @@
 (let ((pwd (replace-regexp-in-string "\n\\'" "" (shell-command-to-string 
"pwd"))))
   (load (concat pwd "/clj-parse.el")))
 
-(ert-run-tests-batch-and-exit)
+(if (getenv "CLJ_PARSE_LINT")
+    (let ((success t))
+      (dolist (file '("clj-parse.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)))
+  (ert-run-tests-batch-and-exit))



reply via email to

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