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

golangci-lint fails #204

Open
wetneb opened this issue Jul 8, 2024 · 0 comments · May be fixed by #205
Open

golangci-lint fails #204

wetneb opened this issue Jul 8, 2024 · 0 comments · May be fixed by #205
Labels
Help Wanted Community help wanted

Comments

@wetneb
Copy link

wetneb commented Jul 8, 2024

I followed the Getting Started instructions from the README and got the following error when running make as instructed:

...
Running golangci-lint
/usr/bin/go vet ./...
/home/user/my-plugin/bin/golangci-lint run ./...
ERRO [runner] Panic: atomicalign: package "main" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference: goroutine 6450 [running]:
runtime/debug.Stack()
	/usr/lib/go-1.22/src/runtime/debug/stack.go:24 +0x5e
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:102 +0x13e
panic({0x15d5de0?, 0x217d330?})
	/usr/lib/go-1.22/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x19b1fb0, 0x2194940})
	/usr/lib/go-1.22/src/go/types/sizes.go:228 +0x30f
golang.org/x/tools/go/analysis/passes/atomicalign.run(0xc01581aff0)
	/home/user/go/pkg/mod/golang.org/x/[email protected]/go/analysis/passes/atomicalign/atomicalign.go:33 +0x52
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc0022fffd0)
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:188 +0x98a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:106 +0x17
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001b52dc0, {0x176d678, 0xb}, 0xc002e3d748)
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc002437c80?)
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:105 +0x7a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc0022fffd0)
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xa8
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze in goroutine 160
	/home/user/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1e5 
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: atomicalign: package "main" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference 
ERRO Running error: 1 error occurred:
	* can't run linter goanalysis_metalinter: goanalysis_metalinter: atomicalign: package "main" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference
 

Running on Debian testing, go version go1.22.4 linux/amd64

wetneb added a commit to wetneb/mattermost-plugin-starter-template that referenced this issue Jul 8, 2024
@hanzei hanzei added the Help Wanted Community help wanted label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Community help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants