I am attempting add an additional Flycheck
syntax checker for nxml-mode
, however errors/warnings are not showing up even though the linter, igor
, is reporting errors/warnings.
Here is the syntax checker definition.
(flycheck-define-checker igor
"FreeBSD Documentation Project sanity checker.
See URLs http://www.freebsd.org/docproj/ and
http://www.freshports.org/textproc/igor/."
:command ("igor" "-X" source-original)
:standard-input t
:error-parser flycheck-parse-checkstyle
:modes (nxml-mode))
I made the new definition available for automatic selection.
(add-to-list 'flycheck-checkers 'igor 'append)
When the major mode is nxml-mode
, I can run flycheck-verify-setup
to verify that igor
is listed as a checker.
Syntax checkers for buffer chapter.xml in nxml-mode:
xml-xmlstarlet
- predicate: t
- executable: Found at /usr/local/bin/xml
xml-xmllint
- predicate: t
- executable: Found at /usr/local/bin/xmllint
igor
- predicate: t
- executable: Found at /usr/local/bin/igor
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
If I run flycheck-compile
and chose igor
, I see errors/warnings.
-*- mode: compilation; default-directory: "~/scm/nm/freebsd-docs.svn/doc/head/en_US.ISO8859-1/books/fdp-primer/editor-config/" -*-
Compilation started at Wed Jul 13 15:12:14
igor -X /home/jrm/scm/nm/freebsd-docs.svn/doc/head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml
<file name="/home/jrm/scm/nm/freebsd-docs.svn/doc/head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml">
<error line="49" column="1" severity="warning" message="spelling" source="igor" />
<error line="56" column="1" severity="warning" message="wrap long line" source="igor" />
<error line="112" column="1" severity="warning" message="bad tag indent" source="igor" />
<error line="114" column="1" severity="warning" message="bad tag indent" source="igor" />
<error line="114" column="1" severity="warning" message="wrap long line" source="igor" />
<error line="115" column="1" severity="warning" message="bad tag indent" source="igor" />
<error line="115" column="1" severity="warning" message="wrap long line" source="igor" />
<error line="119" column="1" severity="warning" message="wrap long line" source="igor" />
<error line="120" column="1" severity="warning" message="blank line with whitespace" source="igor" />
</file>
Compilation finished at Wed Jul 13 15:12:15
I can get basic error checking using :error-patterns
instead of :error-parser
in the definition, so the problem may be related to parsing the checkstyle XML output.
I am running the sixth pretest for the soon-to-be-released as Emacs 25.1. What am I missing?
C-c ! n
gives "No more Flycheck errors" even after I insert errors that I know will trigger igor. These errors are reported when I doC-c ! C-c
and select igor. Explicitly selecting igor withC-c ! s
makes no difference.