Skip to content

x/tools/gopls: set non-zero exit code on check command when there are errors #67078

Open
@silverwind

Description

@silverwind

Proposal Details

gopls check is useful to lint code, but it currently always sets exit code 0 which is not ideal when one wants to run it for example on a CI:

$ gopls check internal/cmd/check.go; echo $?
main.go:10:24: unused parameter: file
0

I suggest to either always set exit code to non-zero when there are errors, or introduce a new --exit-code option to do the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions