diff options
author | Neil Okamoto <neil.okamoto@gmail.com> | 2018-02-06 08:51:04 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2018-03-05 08:13:41 +0700 |
commit | 30fe9ea32446bb90057d3c57334a9cbe868e8e69 (patch) | |
tree | c458f7fc2457d8f4ef2fd4fa18a74edf6acbf2d8 /test | |
parent | f65d3246662874b6f8d71d1e64257dcf635b4fc9 (diff) |
[Fix #2199] Implement elisp-lint.el in CI
Diffstat (limited to 'test')
-rw-r--r-- | test/scripts/cider-bytecomp-warnings.el | 46 | ||||
-rw-r--r-- | test/scripts/cider-checks.el | 33 |
2 files changed, 0 insertions, 79 deletions
diff --git a/test/scripts/cider-bytecomp-warnings.el b/test/scripts/cider-bytecomp-warnings.el deleted file mode 100644 index ec47e646..00000000 --- a/test/scripts/cider-bytecomp-warnings.el +++ /dev/null @@ -1,46 +0,0 @@ -;;; cider-bytecomp-warnings.el --- Check for byte-compilation problems - -;; Copyright © 2012-2018 Bozhidar Batsov and contributors -;; -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -;; This file is not part of GNU Emacs. - -;;; Commentary: - -;; This is a script to be loaded while visiting a CIDER source file. It will -;; prepare all requirements and then byte-compile the file and signal an error -;; on any warning. For example: -;; -;; emacs -Q --batch -l test/cider-bytecomp-warnings.el cider-mode.el - -;; This assumes that all CIDER dependencies are already on the package dir -;; (probably from running `cask install'). - -(setq load-prefer-newer t) -(add-to-list 'load-path (expand-file-name "./")) -(require 'package) -(package-generate-autoloads 'cider default-directory) -(package-initialize) -(load-file "cider-autoloads.el") -(setq byte-compile-error-on-warn t) - -;; Avoid spurious unused lexical arg warning from `condition-case' -;; See: https://emacs.stackexchange.com/a/10058/10269 -(when (version< emacs-version "25.1") - (setq byte-compile--use-old-handlers nil)) - -(batch-byte-compile) - -;;; cider-bytecomp-warnings.el ends here diff --git a/test/scripts/cider-checks.el b/test/scripts/cider-checks.el deleted file mode 100644 index d7e29980..00000000 --- a/test/scripts/cider-checks.el +++ /dev/null @@ -1,33 +0,0 @@ -;; 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) -(require 'seq) -(package-initialize) - -;; disable some annoying (or non-applicable) checkdoc checks -(setq checkdoc-package-keywords-flag nil) -(setq checkdoc-arguments-in-order-flag nil) -(setq checkdoc-verb-check-experimental-flag nil) - -(let ((files (seq-filter - (lambda (el) (not (string-match-p "autoloads" el))) - (directory-files default-directory t - "\\`[^.].*\\.el\\'" t)))) - ;; `checkdoc-file' was introduced in Emacs 25 - (when (fboundp 'checkdoc-file) - (dolist (file files) - (checkdoc-file file)) - (when (get-buffer "*Warnings*") - (message "Failing due to checkdoc warnings...") - (kill-emacs 1))) - - (when (apply #'check-declare-files files) - (kill-emacs 1))) |