1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00

checkdoc: Don't add "Commentary" header to test files

* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't add "Commentary:" header if it looks like a test file.
This commit is contained in:
Stefan Kangas 2021-09-26 20:20:20 +02:00
parent 950831c369
commit 77494628e2

View file

@ -2385,8 +2385,13 @@ Code:, and others referenced in the style guide."
err
(or
;; * Commentary Section
(if (not (lm-commentary-mark))
(progn
(if (and (not (lm-commentary-mark))
;; No need for a commentary section in test files.
(not (string-match
(rx (or (seq (or "-test.el" "-tests.el") string-end)
"/test/" "/tests/"))
(buffer-file-name))))
(progn
(goto-char (point-min))
(cond
((re-search-forward