Protect elisp-flymake-checkdoc against boundless diagnostics

These would be the kind of "This file needs a ;;Code section" and
such.

* lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc): Resist
checkdoc diagnostics with no end position.
This commit is contained in:
João Távora 2020-12-31 13:24:32 +00:00
parent 87a2cfc085
commit f0d2b92f8b

View file

@ -1720,7 +1720,8 @@ Calls REPORT-FN directly."
collect
(flymake-make-diagnostic
(current-buffer)
start end :note text)))
(or start 1) (or end (1+ (or start 1)))
:note text)))
collected))
(defun elisp-flymake--byte-compile-done (report-fn