Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

x/tools/gopls: a way to control staticcheck options #35826

Closed
OneOfOne opened this issue Nov 25, 2019 · 3 comments
Closed

x/tools/gopls: a way to control staticcheck options #35826

OneOfOne opened this issue Nov 25, 2019 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@OneOfOne
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version go1.13.4 linux/amd64
$ gopls version
golang.org/x/tools/gopls 0.2.0
    golang.org/x/tools/gopls@v0.2.1 h1:qXHEqJw4CqROYvoDXinY1ZOkyAFS+jcPOvLRK76dvwY=

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="off"
GOARCH="amd64"
GOBIN="/home/oneofone/code/go/bin"
GOCACHE="/tmp/.gocache"
GOENV="/home/oneofone/.config/go/env"
GOEXE=""
GOFLAGS="-gcflags=-c=16"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oneofone/code/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/src/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/src/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build965012732=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.13.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.13.4
uname -sr: Linux 5.3.12-arch1-1
LSB Version:	1.4
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.30.
lldb --version: lldb version 9.0.0
gdb --version: GNU gdb (GDB) 8.3.1

What did you do?

Working on a huge codebase that doesn't pass some of the linting options in vscode.

What did you expect to see?

A way to turn off some of the lint options in staticcheck

What did you see instead?

1000s of lint errors, had to turn of staticcheck all together.

	"gopls": {
		"usePlaceholders": true,
		"completeUnimported": true,
		"staticcheck": false,
		"watchChangedFiles": true,
		"deepComplete": true
	},
@gopherbot gopherbot added this to the Unreleased milestone Nov 25, 2019
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 25, 2019
@OneOfOne
Copy link
Contributor Author

cc @stamblerre @ianthehat

@stamblerre
Copy link
Contributor

Thanks for the report! This will be fixed in CL 208098.

@OneOfOne
Copy link
Contributor Author

Actually, I just dug through the source trying to implement it and and found experimentalDisabledAnalyses which does exactly what I need.

Sorry for the noise.

@golang golang locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants