ox-gemini/test/lint.el
Omar Polo d680aacf9d improve `make lint'
Drop the checkdoc-batch library in favour of a simpler approach:
run checkdoc on all *.el files in the repo, bailing out on the first
encountered error.

While here, don't call checkdoc on eval.

Signed-off-by: Justin Abrahms <justin@abrah.ms>
2021-08-17 09:51:28 -07:00

17 lines
814 B
EmacsLisp

(message "Emacs version: %s" emacs-version)
(dolist (file (file-expand-wildcards "*.el"))
(let ((checkdoc-diagnostic-buffer "*warn*")
;; bail out on checkdoc warnings
(checkdoc-create-error-function (lambda (text start end &optional unfixable)
(message "%s:%s %s"
file
(line-number-at-pos start)
text)
(kill-emacs 1))))
(with-current-buffer (find-file-noselect file)
;; Eval the buffer first because otherwise checkdoc isn't smart
;; enough to recognize that some symbols are defined.
(eval-buffer)
(checkdoc-current-buffer t))))