GNU bug report logs -
#29246
26.0.90; Wrong type argument: integer-or-marker-p, nil in flymake--highlight-line
Previous Next
Reported by: Lele Gaifax <lele <at> metapensiero.it>
Date: Fri, 10 Nov 2017 16:09:01 UTC
Severity: normal
Found in version 26.0.90
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I'm trying the following, that seems to fix the issue:
(defun python--flymake-parse-output (source proc report-fn)
"Collect diagnostics parsing checker tool's output line by line."
(let ((rx (nth 0 python-flymake-command-output-pattern))
(lineidx (nth 1 python-flymake-command-output-pattern))
(colidx (nth 2 python-flymake-command-output-pattern))
(typeidx (nth 3 python-flymake-command-output-pattern))
(msgidx (nth 4 python-flymake-command-output-pattern)))
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
(cl-loop
while (search-forward-regexp rx nil t)
for msg = (match-string msgidx)
for (beg . end) = (flymake-diag-region
source
(string-to-number
(match-string lineidx))
(and colidx
(match-string colidx)
(string-to-number
(match-string colidx))))
for type = (or (and typeidx
(match-string typeidx)
(assoc-default
(match-string typeidx)
python-flymake-msg-alist
#'string-match))
(assoc-default msg
python-flymake-msg-alist
#'string-match)
:error)
if (and beg end)
collect (flymake-make-diagnostic
source beg end type msg) into diags
finally (funcall report-fn diags)))))
where I added an `if (and beg end)' clause around `collect'.
Is that reasonable, or would it be better to make `flymake--highlight-line'
more robust againt a diagnostic with invalid `beg'/`end' slots?
This bug report was last modified 5 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.