branch: master
commit 240d7176324ba1da20af1bfd69f1bc610c7c1373
Author: fabacino <[email protected]>
Commit: Oleh Krehel <[email protected]>
Makefile: Add target checkdoc to check documentation guidelines of lisp
files
Fixes #211
---
Makefile | 7 +++++--
README.md | 2 +-
targets/avy-init.el | 6 ------
targets/checkdoc.el | 2 ++
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index 9303c7c..430da88 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README.md b/README.md
index 63ff7be..5a4542b 100644
--- a/README.md
+++ b/README.md
@@ -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`.
diff --git a/targets/avy-init.el b/targets/avy-init.el
index 9ce46bb..6751b74 100644
--- a/targets/avy-init.el
+++ b/targets/avy-init.el
@@ -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)
diff --git a/targets/checkdoc.el b/targets/checkdoc.el
new file mode 100644
index 0000000..be3823b
--- /dev/null
+++ b/targets/checkdoc.el
@@ -0,0 +1,2 @@
+(checkdoc-file "avy-test.el")
+(checkdoc-file "avy.el")