Skip to content
New issue

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

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

Already on GitHub? # to your account

Support "gopls check" linter #686

Closed
fho opened this issue Sep 12, 2019 · 9 comments
Closed

Support "gopls check" linter #686

fho opened this issue Sep 12, 2019 · 9 comments
Labels

Comments

@fho
Copy link

fho commented Sep 12, 2019

Add support for running gopls check via golangci-lint.

gopls check can find issues that cause compilation problems without having to compile the code.

@jirfag jirfag added the linter: new Support new linter label Sep 24, 2019
@tpounds tpounds added the help wanted Issue that needs help from a contributor label Oct 8, 2019
@stale
Copy link

stale bot commented Apr 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Apr 5, 2020
@stale stale bot closed this as completed Apr 19, 2020
@ldez ldez removed help wanted Issue that needs help from a contributor linter: new Support new linter labels Apr 3, 2021
@silverwind
Copy link
Contributor

silverwind commented Dec 19, 2024

This would be very useful. Currently I'm running gopls check <files> in addition to golangci-lint and it discovers a number of issues that no existing linter can find like impossible conditions and such.

I have to concur thought that gopls is definitely on the slower side. Takes 3 minutes to lint the gitea codebase.

@silverwind
Copy link
Contributor

@ldez any chance for re-open?

Currently I'm using this script to lint with gopls. Would appreciate having gopls as a full-fledged linter.

@ldez ldez added declined and removed stale No recent correspondence or work activity labels Feb 17, 2025
@ngotchac
Copy link

@ldez Any reason why this go declined?

@ldez
Copy link
Member

ldez commented Feb 27, 2025

gopls is a binary not designed to be used as a library: all the analyzers are inside an internal package and those analyzers use internal packages outside of the gopls module (yes it is possible in some cases).
We can easily say that it is an intentional design to strongly limit the usage of those analyzers outside gopls.

So for now, we will not try to overcome those limitations even if I have an idea to "fix" the problem.

rule n°1 of open-source: no is temporary, yes is forever.

@ngotchac
Copy link

Gotcha, thanks for the prompt response! Too bad they made it that way..

@silverwind

This comment has been minimized.

@ngotchac

This comment has been minimized.

@silverwind

This comment has been minimized.

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

No branches or pull requests

6 participants