Closed ezmiller closed 7 years ago
This has been requested a few times in the past. It isn't really feasible. eslint
has a plugin architecture, and its (non-linting) error messages can be essentially anything. Worse yet, there are other checkers masquerading as eslint
, with different sets of error messages. Trying to parse something meaningful out of all possible junk eslint
can produce is a losing battle.
What syntastic does instead is look at the exit codes from the linters. If a linter reliably returns different exit codes for "finished ok" / "finished ok with linting errors", and "not ok" (OS errors, plugins not found, and the like), then syntastic can print the full output of the linter, presumably containing the relevant complaints. This works reasonably well. However, not all checkers exit with discriminating codes. Also, finding out whether one can rely on the exit code of a given linter like this typically involves digging through said linter's sources. A while ago I requested input from people about which linters return useful error codes. I got zero answers. shrug
Sounds like a weakness in vim then? I mean shouldn't plugins have a reliable mechanism for reporting errors? Thanks for the response.
This has nothing to do with Vim, or with Vim plugins. eslint
is not a Vim plugin.
I just discovered that syntastic was failing to run my eslint checker for javascript because it couldn't find one of the plugins specified in my
.eslintrc
. I only discovered this after enablingg:syntastic_debug
, and wading through the output. This is just a suggestion, but maybe a good enhancement for syntastic would be to give warnings more readily on certain errors, rather than failing silently? In this case, for example, where syntastic is unable to locate a plugin, it seems that a message is in order, and could save a lot of time.