]> git.eshelyaron.com Git - emacs.git/commit
Keep track of matching rules in compilation-mode
authorMattias Engdegård <mattiase@acm.org>
Mon, 19 Oct 2020 10:14:37 +0000 (12:14 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 19 Oct 2020 11:00:14 +0000 (13:00 +0200)
commit653eab4788010b2c070dadea652a99e89c0ad3ac
tree1d4681cd4b1bfe86ced4164c6e0eb1c34cb3a36c
parentb16cd3f1e57239887d393129969bdb702feb10d4
Keep track of matching rules in compilation-mode

When matching messages in compilation-mode, keep track of the rule
employed for each match.  This facilitates debugging and allows us to
verify that each test case really exercises the rule that we expect it
to.

Naturally this uncovered several test cases that didn't check what the
author thought they did; the rules affixed to
compile-tests--test-regexps-data are those actually used, so that the
tests still pass.

* lisp/progmodes/compile.el (compilation--message): Add 'rule' slot.
(compilation-directory-properties, compilation-error-properties)
(compilation-internal-error-properties, compilation-parse-errors)
(compilation--compat-parse-errors): Set the rule slot.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-tests--grep-regexp-testcases)
(compile-tests--grep-regexp-tricky-testcases): Add rules to test cases.
(compile--test-error-line): Check that the rule matches what we expect.
(compile-test-grep-regexps): Adapt to test case format.
Remove now superfluous ert-info.
lisp/progmodes/compile.el
test/lisp/progmodes/compile-tests.el