Closed posita closed 6 years ago
@posita Thanks for the report! I'm currently running a different version of flake8, so it's very possible that the format has changed.
msherry@msherry-mbp$ flake8 --version
3.3.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.5.0) CPython 2.7.13 on Darwin
That said, though, it seems weird that it would show up in one place but not another if there was a parse issue. I notice that you're running elpy
, which has its own flake8 integration. Can you confirm the value of flycheck-pycheckers-checkers
and ensure that flake8 is actually being run by flycheck-pycheckers, rather than elpy?
If so, I'll try to find some time to investigate this soon and release a fix!
smacks forehead
Weird. flake8
was unchecked. I have no idea how/when that happened. Apologies for the red herring! 😳
As an aside, if I remove all customizations for that variable, it defaults to pylint
, mypy 2
, and mypy 3
.
UPDATE: The noted defaults are intended. I wonder when I screwed up my own config. 🤔 In any event, apologies again for the distraction! 😞
Even if after some years... I got exactly into the same issue recently.
Elpy runs the flake8 command only when a python file is visited for the first time (or reverted), then it passes the control to flymake. To prevent any collision I disabled flymake and enabled flycheck with:
(add-hook 'elpy-mode-hook 'flymake-mode-off)
(add-hook 'elpy-mode-hook 'flycheck-mode)
Then to prevent elpy from running flake8 I set an invalid command string:
(setq elpy-syntax-check-command "none")
Moreover I changed the checkers for flycheck-pychechers to:
(setq flycheck-pycheckers-checkers (quote (flake8)))
With this setup the Flycheck errors buffer is empty, though if I run the flycheck-pycheckers python script from shell with --checker flake8
option I get all the flake8 messages.
Might it be a wrong parsing through Flyckech, i.e. an erroneous checker definition in the flycheck-pychecker.el file?
@sfavazza Thanks for the report! It looks like the output of flake8 is different than the regex is expecting -- e.g. the first item in an output line is "WARNING/ERROR", while the checker is expecting a filename first.
I've opened a separate issue (#47) to track this -- let's continue the conversation there.
I have pycheckers set up with
flake8
,mypy
, andpylint
. I'm not sure when this started happening, butflake8
items no longer appear in the error list. They still show up in the minibuffer though when the cursor is on an offending line:I'm still investigating the underlying cause, but I suspect
flake8
may have changed its output format?Test file: