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
Milestone

Comments

@OneOfOne
Copy link
Contributor

@OneOfOne OneOfOne commented Nov 25, 2019

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
@OneOfOne

This comment has been minimized.

Copy link
Contributor Author

@OneOfOne OneOfOne commented Nov 25, 2019

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Nov 25, 2019

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

@OneOfOne

This comment has been minimized.

Copy link
Contributor Author

@OneOfOne OneOfOne commented Nov 25, 2019

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.

@OneOfOne OneOfOne closed this Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.