help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

flymake how to let him recognize a message as a warning


From: Gabriele Lanaro
Subject: flymake how to let him recognize a message as a warning
Date: Sun, 6 Jun 2010 23:20:20 +0200

I have an output form a checking program (pyflakes) like that:

daemon_.py:3: 'pyqt' imported but unused

I feel that this should be a warning, but pyflakes don't writes any "warning" message, it treat it as a common lint error.

The current code to plug pyflakes in flymake is that one:

  (defun flymake-pyflakes-init ()
      (let* ((temp-file (flymake-init-create-temp-buffer-copy
                         'flymake-create-temp-inplace))
             (local-file (file-relative-name
                          temp-file
                          (file-name-directory buffer-file-name))))
        (list "pyflakes" (list local-file)))))
  (add-to-list 'flymake-allowed-file-name-masks
               '("\\.py\\'" flymake-pyflakes-init))


There's a way to make the pattern: .."imported but unused$" to be highlighted as a warning and not as an error?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]