You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Anyway, please consider adding this to ALE and / or vim-go instead. The go checkers in syntastic are still around only for backwards compatibility, they don't serve any real purpose these days.
From my end, the checker seems to be in the commit.
gopls is already supported by ALE and vim-go.
I'm using syntastic, so this checker was useful to me.
From my end, the checker seems to be in the commit.
Right, I can see it now too. So either I discovered a race condition in GitHub, or I was just imagining things. I guess I'll spend the rest of my life wondering.
I'm using syntastic, so this checker was useful to me.
Well, the point still stands: go checkers should have been deleted a long time ago, and adding more checkers for me to take care of is not a step in that direction. Also, syntastic is essentially dead these days.
Anyway, about the checker:
In IsAvailable() you should probably parse the output rather than check v:shell_error. The latter is known not to work reliably under the cmd.exe shell on Windows, so it should be avoided when possible.
You probably want let errorformat = ... '%f:%l:%c-%\d%\+: %m,' .... Backslashes have no special meaning inside single quotes.
The exec in CreateAndRegisterChecker() is redundant but not wrong.
Parsing the output in IsAvailable would no really be helpful. The first versions of gopls did not understand the commands "version" and "check" (this is the case of the gopls available in Debian). So either "gopls version" fails as it does not understand "go version", and we can't use it. Or it succeed, and can be used.
I also tested gopls on Windows. It does correctly return an error code if it does not understand the option provided.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gopls is a new Language Server Protocol implementation for Go. With recent releases, it can also be used as a standalone linter.
This new checker uses gopls to check Go programs.