sourcegraph / go-langserver

Go language server to add Go support to editors and other tools that use the Language Server Protocol (LSP)
https://sourcegraph.com
MIT License
1.17k stars 89 forks source link

fixed the unnecessary panic in lint #322

Closed imjustfly closed 6 years ago

imjustfly commented 6 years ago

an unnecessary panic:

https://github.com/sourcegraph/go-langserver/blob/e1b4a1b1f25a0e70582780a7da7c2c85b21614e0/langserver/lint.go#L152-L154

If source file is saved with wrong syntax, go-langserver will panic. Just printing it is enough.