@@ 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)