Between version 0.50.0 and 0.51.0 of Flow, the error message format changed from:
lib/foo.js:8
8: Math.abs('1');
^^^ string. This type is incompatible with the expected param type of
160: abs(x: number): number;
^^^^^^ number. See lib: /tmp/flow/flowlib_1554b810/core.js:160
to:
Error: lib/foo.js:8
6: Math.cos('1');
^^^ string. This type is incompatible with the expected param type of
171: cos(x: number): number;
^^^^^^ number. See lib: /tmp/flow/flowlib_1b834bba/core.js:171
E.g., they added Error: to the front of the message.
I got stuff working by change the errorformat to:
%E%*[Error: ]File "%f"\, line %l\, characters %c-%m,%C%m,%Z%m
Thanks for the report and suggested fix.
There is likely something better than %*[Error: ] for this though; need to look it up.
Probably, I have literally no idea what I'm doing. I just typed until something was reported again.
Nobody said 'errorformat' was sane.. ;)
Can you provide the example output using --from=vim --show-all-errors, please?
Can you try https://github.com/neomake/neomake/pull/1503, please?
btw: if you're interested in improving the maker, here are references to what Syntastic (https://github.com/vim-syntastic/syntastic/blob/e1161a723a353db99780f9a9351340df7abbb106/syntax_checkers/javascript/flow.vim#L31) and ALE (https://github.com/w0rp/ale/blob/master/ale_linters/javascript/flow.vim) do.
ALE for example also uses --respect-pragma (based on a version check).
Hi sorry for not testing. Thanks for sorting/merging this. I'll take a look at the Syntastic version as a little sunday project. Thanks.