-
-
Notifications
You must be signed in to change notification settings - Fork 682
Open
Labels
Description
Describe the bug
The golangci-lint plugin fails when a repository contains multiple go.mod files (multiple Go modules). The plugin uses DEFAULT_SINGLE_PARTITION which runs all Go packages through a single golangci-lint invocation without respecting module boundaries. This causes golangci-lint to fail because it cannot resolve imports across separate modules.
Additionally, the default version is 1.64.6 (v1.x), while golangci-lint v2.x has been released with significant improvements and is now the recommended version.
Pants version
2.29.1
OS
Both MacOS and Linux
Additional info
A draft fix has been implemented in PR #22934.
Reproduction steps
- Create a repository with two Go modules:
mod_a/go.mod
mod_a/main.go
mod_b/go.mod
mod_b/main.go - Run
pants lint mod_a:: mod_b:: - Observe golangci-lint fails due to module resolution issues