summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-rw-r--r--lisp/emacs-lisp/checkdoc.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 24e1ae3f097..b3707bb7863 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -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