Makefile: Add target checkdoc to check documentation guidelines of lisp files

Fixes #211
This commit is contained in:
fabacino 2017-08-04 11:31:04 +02:00 committed by Oleh Krehel
parent 83859c30fa
commit 240d717632
4 changed files with 8 additions and 9 deletions

View File

@ -3,13 +3,16 @@ emacs ?= emacs
LOAD = -l avy.el -l avy-test.el
.PHONY: all test clean
.PHONY: all test clean checkdoc
all: compile test
all: compile test checkdoc
test:
$(emacs) -batch $(LOAD) -f ert-run-tests-batch-and-exit
checkdoc:
$(emacs) -batch -l targets/checkdoc.el
compile:
$(emacs) -batch -l targets/avy-init.el

View File

@ -113,6 +113,6 @@ The copyright assignment isn't a big deal, it just says that the copyright for y
The basic code style guide is to use `(setq indent-tabs-mode nil)`. It is provided for you in [.dir-locals.el](https://github.com/abo-abo/avy/blob/master/.dir-locals.el), please obey it.
Before submitting the change, run `make compile` and `make test` to make sure that it doesn't introduce new compile warnings or test failures. Also run <kbd>M-x</kbd> `checkdoc` to see that your changes obey the documentation guidelines.
Before submitting the change, run `make compile` and `make test` to make sure that it doesn't introduce new compile warnings or test failures. Also run `make checkdoc` to see that your changes obey the documentation guidelines.
Use your own judgment for the commit messages, I recommend a verbose style using `magit-commit-add-log`.

View File

@ -22,11 +22,5 @@
(add-to-list 'load-path default-directory)
(mapc #'byte-compile-file '("avy.el"))
(require 'avy)
(if (fboundp 'checkdoc-file)
(checkdoc-file "avy.el")
(require 'checkdoc)
(with-current-buffer (find-file "avy.el")
(checkdoc-current-buffer t)))
(global-set-key (kbd "C-c j") 'avy-goto-char)
(global-set-key (kbd "C-'") 'avy-goto-char-2)

2
targets/checkdoc.el Normal file
View File

@ -0,0 +1,2 @@
(checkdoc-file "avy-test.el")
(checkdoc-file "avy.el")