Skip to content

Conversation

@ajinbaby01
Copy link

@ajinbaby01 ajinbaby01 commented Sep 3, 2025

Modify the lint function to recursively search upwards from the current file's directory for the nearest go.mod file, then runs golangci-lint on that module root instead of the immediate file directory.
This PR fixes linting issues in monorepos where the workspace root lacks a go.mod file.

@yeldiRium
Copy link

I found this PR only after opening #67 and after implementing it myself in https://github.com/yeldiRium/golangci-lint-langserver/tree/feat/monorepo-support and based on that have some input:

golangci-lint searches for the closets go.mod itself. there seems to be no need to implement this. golangci-lint-langserver can run golangci-lint in the directory of each file and golangci-lint will recognize the closest go.mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants