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

How to disable the annoying "exported type Account should have comment or be unexported"? #304

Closed jaggerwang closed 6 years ago

jaggerwang commented 6 years ago

This is really annoying as sometimes the exported type or method is only used inside the project and there is nothing need to comment out.

image

lloiser commented 6 years ago

golang tries to enforce a certain code style. This is just one part of it. https://github.com/golang/go/wiki/CodeReviewComments#doc-comments

Either add documentation to the exported types or methods or just don't export them if they are only used in the current package alone.

jaggerwang commented 6 years ago

OK, got it!

keegancsmith commented 6 years ago

Also I don't believe go-langserver reports those issues. That would be vscode-go integration with go-lint.