Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errorformat is ignored #27

Closed
albertosantini opened this issue Jan 17, 2017 · 2 comments
Closed

errorformat is ignored #27

albertosantini opened this issue Jan 17, 2017 · 2 comments

Comments

@albertosantini
Copy link

albertosantini commented Jan 17, 2017

I read #16 and #19 about the output is not matched by errorformat, which is defined with a CompilerSet command. I open a new issue because I didn't find a solution and those issues are old.

In ftplugin/javascript.vim: autocmd BufWritePost <buffer> compiler javascript | Make %
In compiler/javascript.vim:

let &l:makeprg=substitute(system('npm bin'), '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '') . '/eslint' . " -f compact"
CompilerSet errorformat=%E%f:\ line\ %l\\,\ col\ %c\\,\ %m,%C%.%#

In pack/my/start/z/plugin/asyncrun.vim:

command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>

And the result is the following one:

|| [C:\my\Dev\snippets\argo\node_modules\.bin/eslint -f compact accounts.service.js]
accounts.service.js|38 col 67 error| Error - Missing semicolon. (semi)
|| 
|| [Finished in 1 seconds with code 1]

Instead of (using standard make)

accounts.service.js|38 col 67 error| Error - Missing semicolon. (semi)

I tried

:compiler javascript
:set errorformat=%E%f:\ line\ %l\\,\ col\ %c\\,\ %m,%C%.%#
:Make %

With the same undesired results.

Any hint or is it the expected result?

Reference: https://github.com/albertosantini/vimfiles

@albertosantini
Copy link
Author

Well, for my use cases, nowadays I have been using ale plugin.

Thanks for the project.

@skywind3000
Copy link
Owner

well, I can’t see any difference between the actual output and your expectation, except the first line (command string) and the last line (timing result), they are added by asyncrun, the remain content is emitted by your command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants