Skip to content

x/tools/cmd/goimports: can't extract issues from gofmt diff output #56412

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

Closed
bushkov opened this issue Oct 25, 2022 · 5 comments
Closed

x/tools/cmd/goimports: can't extract issues from gofmt diff output #56412

bushkov opened this issue Oct 25, 2022 · 5 comments
Labels
FrozenDueToAge Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bushkov
Copy link

bushkov commented Oct 25, 2022

After upgrading from macOS 12.6 to 13.0, I cannot run goimports linter. The error message I get is:

ERRO Running error: 1 error occurred:
	* can't run linter goimports: goimports: can't extract issues from gofmt diff output "... (\n": can't parse patch: parsing time "2022-10-25 14:43:33" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700

Go version and Environment

$ go version && go env
go version go1.19.2 darwin/arm64
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/username/Library/Caches/go-build"
GOENV="/Users/username/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/victor/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/victor/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.19.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.19.2/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/username/Projects/projectname/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/x5/1q2gh29n4r7_njfgc8hkspgm0000gn/T/go-build2375447467=/tmp/go-build -gno-record-gcc-switches -fno-common"
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 25, 2022
@gopherbot gopherbot added this to the Unreleased milestone Oct 25, 2022
@seankhliao
Copy link
Member

how are you running goimports?

@bushkov
Copy link
Author

bushkov commented Oct 25, 2022

how are you running goimports?

via golangci-lint run --disable-all -E goimports.

@seankhliao
Copy link
Member

please try running it without golangci-lint

@bushkov
Copy link
Author

bushkov commented Oct 25, 2022

Running it without golangci-lint doesn't produce any errors. Looks like it's not an issue with goimports then.

@seankhliao
Copy link
Member

please file an issue with golangci-lint

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
@golang golang locked and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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