~ruther/emacs.d

25481f784652c4bf1c9d282ee9cc1a3db52d791a — Rutherther a month ago f02633c
feat: ignore some messages from ghdl syntax reports
1 files changed, 8 insertions(+), 3 deletions(-)

M init.el
M init.el => init.el +8 -3
@@ 1537,7 1537,9 @@ minibuffer, even without explicitly focusing it."

(defun flymake-ghdl--parse-diagnostics (source temp-file)
  "Parse GHDL diagnostics from current buffer for SOURCE file."
  (let (result)
  (let ((result '())
        (ignored-patterns '("cannot find resource library \".*\""
                           "entity \".*\" was not analysed")))
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward


@@ 1551,8 1553,11 @@ minibuffer, even without explicitly focusing it."
               (type (cond ((string-match-p "error\\|Error" type-str) :error)
                          ((string-match-p "warning\\|Warning" type-str) :warning)
                          (t :note)))
               (pos (flymake-diag-region (get-file-buffer source) line-num col-num)))
          (when pos
               (pos (flymake-diag-region (get-file-buffer source) line-num col-num))
               (should-ignore (cl-some (lambda (pattern)
                                        (string-match-p pattern msg))
                                      ignored-patterns)))
          (when (and pos (not should-ignore))
            (push (flymake-make-diagnostic
                   (get-file-buffer source)
                   (car pos) (cdr pos)