I have a flake8 wrapper script: a small program that execs flake8 (in order to pick an appropriate version of flake8 for whichever project I'm working on). flycheck is using that wrapper script (I'm sure of that because I can break syntax checking in emacs by editing the script).
I have verified that if I change the source code of the wrapper script in a certain way, such as to leave its stdout, stderr and exit code unchanged, flycheck's behaviour nevertheless changes!
In particular it seems that with one source code text for my wrapper script, flycheck shows both errors (red squiggly line under offending lines) and warnings (yellow squiggly line) -- and with the other source code text, it displays only warnings.
It seems perhaps emacs is actually looking at the text of the wrapper script itself in order to guess something?
Perhaps even more oddly, I've reproduced the same issue using both a wrapper script implemented in python, and one implemented in sh -- so the source code in each case is rather different!
This is a pretty crazy issue, anybody have any guesses, or hints on start debugging flycheck?
All help appreciated!