diff --git a/.golangci.reference.yml b/.golangci.reference.yml index ed828fe1caae..ab0a47e504ad 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -6,7 +6,8 @@ # Options for analysis running. run: - # Number of CPUs to use when running golangci-lint. + # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. + # If it is explicitly set to 0 (i.e. not the default) then golangci-lint will automatically set the value to match Linux container CPU quota. # Default: the number of logical CPUs in the machine concurrency: 4 diff --git a/pkg/commands/run.go b/pkg/commands/run.go index 60f241af3a7f..0202cc4d6093 100644 --- a/pkg/commands/run.go +++ b/pkg/commands/run.go @@ -157,7 +157,7 @@ func (c *runCommand) persistentPreRunE(cmd *cobra.Command, _ []string) error { if c.cfg.Run.Concurrency == 0 { // Automatically set GOMAXPROCS to match Linux container CPU quota. - _, _ = maxprocs.Set(nil) + _, _ = maxprocs.Set(maxprocs.Logger(c.log.Infof)) } else { runtime.GOMAXPROCS(c.cfg.Run.Concurrency) }