golangci-lint-langserver icon indicating copy to clipboard operation
golangci-lint-langserver copied to clipboard

v0.0.8 breaks when `go.mod` is not in repo root

Open thejan2009 opened this issue 1 year ago • 1 comments

The issue was introduced with #25. Cmd breaks when the go.mod is located in a subpath. Example structure:

project
├── .git
└── go
    ├── go.mod
    └── main.go

One way to solve this would be finding the go mod root. go env GOMOD returns the correct value or os.DevNull if if can't find one.

thejan2009 avatar Mar 30 '23 20:03 thejan2009

I opened a fix PR in golangci-lint https://github.com/golangci/golangci-lint/pull/3748 and propose the changes from v0.0.8 are partially reverted.

thejan2009 avatar Mar 31 '23 08:03 thejan2009