nametake / golangci-lint-langserver

golangci-lint language server
MIT License
229 stars 20 forks source link

fix: didn't work with `goheader` linter #25

Closed klesh closed 1 year ago

klesh commented 2 years ago

The goheader linter requires the working directory to be project root in order to locate the header template correctly.

image

This PR fixes the problem and adds a mechanism to tolerate Unknown Errors by sending the detail to the client instead of crashing out.

Closes #24

thejan2009 commented 1 year ago

Hey, this breaks golangci-lint-langserver for repositories where the go.mod is located in a subpath. Example structure:

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

We always ran golangci-lint from project/go folder. How should this be fixed?