I have the following vim auto command:
autocmd BufWritePost *.go :cex system('revive '..expand('%:p')) | copen
It executes a binary called revive, passing it the current file path, and then opens up the quickfix window with the results from the revive binary.
But if the revive binary returns empty I'd prefer not to have the quickfix window opened.
Wondering if there's a better way to handle this? Is there a way to check for an error status or checking the length of the quickfix results before opening?
Thanks!