]> git.eshelyaron.com Git - emacs.git/commit
Add support for project-wide diagnostics in Flymake (bug#50244)
authorJoão Távora <joaotavora@gmail.com>
Wed, 1 Sep 2021 22:45:53 +0000 (23:45 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 13 Sep 2021 18:03:38 +0000 (19:03 +0100)
commit44824d616b9e048cbc77dfc129e4ffb674ab11e3
tree0f91f96ec1f89bf40d4785cfe6591f999d7141ad
parent96304eadadc120052824e2931373bfa64286e892
Add support for project-wide diagnostics in Flymake (bug#50244)

This is done with two new concepts: "foreign diagnostics" and
"list-only diagnostics".  The manual has been updated with a
description of these new concepts.

* doc/misc/flymake.texi (Flymake utility functions):
Explain creation of foreign diagnostics.
(Foreign and list-only diagnostics): New subsection.
(Listing diagnostics): New subsection.

* lisp/progmodes/flymake.el
(Version): Bump to 1.2.1
(project): Require project.
(flymake--diag): Add new slots 'orig-beg' and 'orig-end'.  Rename
'buffer' slot to 'locus'.
(flymake-make-diagnostic): Rework docstring.  Accept stringp
LOCUS arg.
(flymake-diagnostic-beg, flymake-diagnostic-end)
(flymake-diagnostic-buffer):  Simplify definition.
(flymake--equal-diagnostic-p): New helper
(flymake--highlight-line): Rework.  Accept FOREIGN arg.
(flymake--state): Work docstring. Add new slot 'foreign-diags'
(flymake--handle-report): Call
flymake--update-diagnostics-listings.
(flymake--handle-report): New helper.
(flymake--mode): Forward declare.
(flymake--handle-report): Rework for foreign diagnostics.
(flymake-mode): When turning on, notice any Flymake diagnostics
for current buffer.  When turning off update diagnostics listings.
(flymake-kill-buffer-hook): Turn off flymake explicitly before
killing.
(flymake--mode-line-counter): Use flymake-diagnostics to collect
diagnostics.
(flymake-show-diagnostic): Visit buffer of file-specific
diagnostic.
(flymake--tabulated-entries-1): New helper extracted from
flymake--diagnostic-buffer-entries.
(flymake--diagnostics-buffer-entries): Rework.
(flymake--diagnostics-base-tabulated-list-format): New helper.
(flymake--diagnostics-buffer-name): Adjust.
(flymake-list-only-diagnostics): New variable.
(flymake--project-diagnostic-list-project): New variable.
(flymake--clear-list-only-diagnostics): New helper.
(flymake-project-diagnostics-mode): New major mode.
(flymake--project-diagnostics)
(flymake--project-diagnostics-entries)
(flymake--project-diagnostics-buffer): New helpers.
(flymake-show-project-diagnostics): New command.
(flymake--update-diagnostics-listings): New helper.
(flymake-show-buffer-diagnostics): Renamed from flymake-diagnostics-buffer.

* etc/NEWS: Mention change.
doc/misc/flymake.texi
etc/NEWS
lisp/progmodes/flymake.el