We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The govet linter is not reporting errors by the unsafeptr analyzer.
When I run
$ go vet
I get
# playground .\main.go:10:14: possible misuse of unsafe.Pointer
However when I run
$ golangci-lint run
I get nothing in the output.
$ golangci-lint --version golangci-lint has version 1.52.2 built with go1.20.2 from da04413a on 2023-03-25T18:11:28Z
$ cat .golangci.yml linters: disable-all: true enable: - govet linters-settings: govet: check-shadowing: true enable-all: true
$ go version && go env go version go1.20.4 windows/amd64 set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\sherif\AppData\Local\go-build set GOENV=C:\Users\sherif\AppData\Roaming\go\env set GOEXE=.exe set GOEXPERIMENT= set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=C:\Users\sherif\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\sherif\go set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=C:\Program Files\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.20.4 set GCCGO=gccgo set GOAMD64=v1 set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=0 set GOMOD=C:\Users\sherif\source\repos\goplayground\go.mod set GOWORK= set CGO_CFLAGS=-O2 -g set CGO_CPPFLAGS= set CGO_CXXFLAGS=-O2 -g set CGO_FFLAGS=-O2 -g set CGO_LDFLAGS=-O2 -g set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\sherif\AppData\Local\Temp\go-build2838372069=/tmp/go-build -gno-record-gcc-switches
$ golangci-lint cache clean $ golangci-lint run -v level=info msg="[config_reader] Config search paths: [./ C:\\Users\\sherif\\source\\repos\\goplayground C:\\Users\\sherif\\source\\repos C:\\Users\\sherif\\source C:\\Users\\sherif C:\\Users C:\\]" level=info msg="[config_reader] Used config file .golangci.yml" level=info msg="[lintersdb] Active 1 linters: [govet]" level=info msg="[loader] Go packages loading at mode 575 (types_sizes|compiled_files|deps|exports_file|name|files|imports) took 464.0199ms" level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 0s" level=info msg="[linters_context/goanalysis] analyzers took 651.7682ms with top 10 stages: printf: 213.6807ms, ctrlflow: 213.2176ms, findcall: 196.5921ms, inspect: 23.2777ms, buildssa: 5.0001ms, loopclosure: 0s, testinggoroutine: 0s, copylocks: 0s, unusedresult: 0s, timeformat: 0s" level=info msg="[runner] Issues before processing: 1, after processing: 0" level=info msg="[runner] Processors filtering stat (out/in): cgo: 1/1, exclude-rules: 0/1, path_prettifier: 1/1, skip_files: 1/1, autogenerated_exclude: 1/1, filename_unadjuster: 1/1, skip_dirs: 1/1, identifier_marker: 1/1, exclude: 1/1" level=info msg="[runner] processing took 526.6µs with stages: autogenerated_exclude: 526.6µs, max_from_linter: 0s, filename_unadjuster: 0s, skip_dirs: 0s, uniq_by_line: 0s, identifier_marker: 0s, path_shortener: 0s, path_prefixer: 0s, severity-rules: 0s, exclude: 0s, sort_results: 0s, max_per_file_from_linter: 0s, fixer: 0s, cgo: 0s, skip_files: 0s, diff: 0s, exclude-rules: 0s, source_code: 0s, nolint: 0s, path_prettifier: 0s, max_same_issues: 0s" level=info msg="[runner] linters took 358.2113ms with stages: govet: 357.1565ms" level=info msg="File cache stats: 0 entries of total size 0B" level=info msg="Memory: 10 samples, avg is 64.1MB, max is 149.3MB" level=info msg="Execution took 882.2994ms"
package main import ( "fmt" "unsafe" ) func main() { var x uintptr = 10000 p := (*int)(unsafe.Pointer(x)) fmt.Println(*p) }
The text was updated successfully, but these errors were encountered:
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Sorry, something went wrong.
Hello,
this report is ignored by default, this is the exclude rule exc0004. It was flagged as a "Common false positive".
To show the report, you have to remove the default exclusions:
issues: exclude-use-default: false
ldez
No branches or pull requests
Welcome
Description of the problem
The govet linter is not reporting errors by the unsafeptr analyzer.
When I run
I get
However when I run
I get nothing in the output.
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: