Skip to content

build: bump golangci-lint to v2.13.2 - #14164

Merged
glours merged 1 commit into
docker:mainfrom
ndeloof:bump-golangci-lint
Sep 2, 2026
Merged

glours merged 1 commit into
docker:mainfrom
ndeloof:bump-golangci-lint

Conversation

@ndeloof

@ndeloof ndeloof commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Bumps the pinned golangci-lint from v2.11.3 to the latest release, v2.13.2.

  • gomodguard is deprecated since v2.13 (warns on every run): migrated to gomodguard_v2, same blocked modules in the new flat-list schema.
  • The newer staticcheck flags SA4023 in watcher_naive.go: tilt-dev/fsnotify's SetRecursive only succeeds on Windows, so on any single GOOS the err == nil comparison is provably constant. The cross-platform code is correct — silenced with a documented //nolint.

🤖 Generated with Claude Code

- migrate gomodguard to gomodguard_v2 (gomodguard is deprecated since
  v2.13 and warns on every run); same blocked modules, flat-list schema
- silence SA4023 in watcher_naive.go: tilt-dev/fsnotify SetRecursive
  only succeeds on Windows, so on any single GOOS the newer staticcheck
  proves the err == nil comparison constant — the cross-platform code
  is correct, the finding is per-GOOS

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof requested review from a team as code owners September 2, 2026 06:50
@ndeloof
ndeloof requested a review from glours September 2, 2026 06:50

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This PR is a routine toolchain bump (golangci-lint v2.11.3 → v2.13.2) with a config migration and a nolint suppression. No bugs were found in the changed code with sufficient confidence for an inline comment.

Lower-confidence findings (not posted inline)

  • [medium] .golangci.yml:83 — gomodguard_v2 flat schema may silently drop or misinterpret version constraint for gotest.tools (confidence: 🟠 weak 31/100)
    The gotest.tools entry carries version: < 3.0.0 in the new flat blocked list. Whether gomodguard_v2 honours the version field as a constraint (banning pre-3.0.0 imports only) or treats it as an unrecognised key and blocks all imports of gotest.tools regardless of version could not be confirmed from the diff alone. Similarly, github.com/distribution/distribution moved from the old versions: sub-section to a plain entry with only reason: — the intent looks right but is worth a quick check against the gomodguard_v2 schema docs. Low evidence strength because the linter schema docs were not available for verification.

@glours glours left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glours
glours enabled auto-merge (rebase) September 2, 2026 07:11
Comment on lines -312 to +316
err = fsw.SetRecursive()
isWatcherRecursive := err == nil
// SetRecursive only succeeds on Windows; every other platform returns
// "Not supported" and the non-recursive fallback below is taken. On a
// single GOOS staticcheck proves the comparison constant (SA4023).
err = fsw.SetRecursive() //nolint:staticcheck
isWatcherRecursive := err == nil //nolint:staticcheck

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about;

	var isWatcherRecursive bool
	if runtime.GOOS == "windows" {
		// Only supported on Windows.
		if err := fsw.SetRecursive(); err != nil {
			return nil, err
		}
		isWatcherRecursive = true
	}
  • on non-Windows; it's not supported, so don't attempt
  • on Windows, it should always pass, but technically could fail if the watcher was already used; in that case return an error (we could even panic);
func (w *Watcher) SetRecursive() error {
	if len(w.watches) > 0 {
		return fmt.Errorf("Cannot call SetRecursive after watches are set")
	}
	w.recursive = true
	return nil
}
@glours
glours merged commit 70e17bf into docker:main Sep 2, 2026
90 of 95 checks passed
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@glours

glours commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@thaJeztah I just opened a follow up PR

glours added a commit that referenced this pull request Sep 2, 2026
Split SetRecursive into the existing per-GOOS watcher files instead of
a runtime check + nolint: the non-Windows stub never calls the
always-failing SetRecursive, and Windows failures now propagate as a
real error instead of silently downgrading to non-recursive.

Addresses review from thaJeztah on #14164.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
docker-compose 5.5.1

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
### ✨ Improvements
* Feat(hooks): capture and surface lifecycle hook output by @glours in docker/compose#14091
* Feat(tracing): surface otel shutdown errors via `--debug` by @htoyoda18 in docker/compose#14152

### 🐛 Fixes
* Fix(events): validate service names before subscribing to events by @glours in docker/compose#14076
* Fix: bake target names collision for services differing by `.` vs `_` by @ndeloof in docker/compose#14058
* Fix(watch): sync into a symlinked directory instead of failing by @Endika in docker/compose#14084
* Fix(hooks): include hook output in the error when a hook fails by @dennislapchenko in docker/compose#14088
* Fix(build): TTY progress on Windows — hand the real stdout to buildkit by @ndeloof in docker/compose#14090
* Fix(watch): sync all files on `initial_sync`, regardless of mtime by @glours in docker/compose#14096
* Fix(network): pass IPAM options when creating networks by @glours in docker/compose#14094
* Fix(ps): honor psFormat from Docker CLI config when no `--format` flag given by @glours in docker/compose#14095
* Fix: dependency wait timeout surfaced only by luck by @ndeloof in docker/compose#14105
* Fix: hold startMx on the start path actually exercised by @ndeloof in docker/compose#14106
* Fix(watch): exclude Dockerfile and compose files from initial sync by @htoyoda18 in docker/compose#14117
* Fix(display): stop ttyWriter.Done from hanging after context cancel by @glours in docker/compose#14119
* Fix(build): honor provenance/sbom false in per-service bake attest by @glours in docker/compose#14112
* Fix(compose): reject unknown subcommands under bridge/transformations by @glours in docker/compose#14143
* Fix(plugins): honor PATHEXT for provider lookup on Windows by @ndeloof in docker/compose#14159
* Fix(watch): stop swallowing SetRecursive errors via nolint by @glours in docker/compose#14165
* Fix(bridge): confirm before wiping non-empty convert output dir by @glours in docker/compose#14174
* Fix(down): spare dangling images of orphaned services, like their tagged image by @htoyoda18 in docker/compose#14154

### 🔧  Internal
* CI: raise e2e go-test timeout to 20m by @ndeloof in docker/compose#14072
* Lint: replace gocyclo with gocognit by @ndeloof in docker/compose#14057
* Test(e2e): prepend provider bin dir to PATH in provider tests by @glours in docker/compose#14079
* Refactor: dismantle the gocognit hotspots, one concern per function by @ndeloof in docker/compose#14060
* Test(e2e): declarative Scenario layer, project files under testdata/<TestName>/ by @ndeloof in docker/compose#14087
* Docs: document engine container event sequences in up monitor by @ndeloof in docker/compose#14024
* E2E: fix test resource isolation and make standalone parallelism configurable by @glours in docker/compose#14073
* API: ScaleOptions carries the replica counts by @ndeloof in docker/compose#14077
* Chore: explicit, unique, greppable internal names by @ndeloof in docker/compose#14049
* Docs: update CONTRIBUTING.md to reflect current tooling and practices by @glours in docker/compose#14098
* API: option structs document what the implementation actually honors by @ndeloof in docker/compose#14078
* Test: unit-lock the imperative start path by @ndeloof in docker/compose#14104
* CLI: display.Mode always resolves to the mode actually rendered by @ndeloof in docker/compose#14103
* CI: validate generated mocks are in sync by @ndeloof in docker/compose#14102
* Docs(sdk): document the EventProcessor API that actually exists by @ndeloof in docker/compose#14131
* Test(e2e): gate the e2e suite behind the build tag the docs already promise by @ndeloof in docker/compose#14132
* Build: error messages name the real remedy, not a removed builder by @ndeloof in docker/compose#14133
* Docs(contributing): legibility guidelines — comments state behavior, not history by @ndeloof in docker/compose#14135
* Test(docs): compile the sdk.md examples by @ndeloof in docker/compose#14136
* Chore(compose): rename convergence.go, whose convergence engine no longer exists by @ndeloof in docker/compose#14129
* Chore(compose): comments state behavior, not history by @ndeloof in docker/compose#14130
* Test(build): re-enable wrong ssh key id test by @htoyoda18 in docker/compose#14120
* Chore(compose): orphan semantics stated where up and down diverge by @ndeloof in docker/compose#14142
* Refactor: NewGraph stops mutating the project by @ndeloof in docker/compose#14124
* Test(e2e): bump compose-bridge images to v0.0.7 by @ricardobranco777 in docker/compose#14170

### ⚙️ Dependencies
* Build(deps): bump github/codeql-action/upload-sarif from 4.37.6 to 4.37.7 by @dependabot[bot] in docker/compose#14101
* Remove buildx as a Go dependency by @ndeloof in docker/compose#14123
* Chore(deps): github.com/sirupsen/logrus v1.10.2, google.golang.org/grpc v1.83.2 by @thaJeztah in docker/compose#14137
* Build: bump golangci-lint to v2.13.2 by @ndeloof in docker/compose#14164
* Build(deps): bump github/codeql-action/upload-sarif from 4.37.7 to 4.37.9 by @dependabot[bot] in docker/compose#14167
* Update to go1.26.8 by @thaJeztah in docker/compose#14172
* Feat(deps): github.com/moby/buildkit v0.33.0 by @thaJeztah in docker/compose#14171
* Build(deps): golang.org/x/crypto v0.56.0 by @thaJeztah in docker/compose#14173
* Bump compose-go to version v2.15.0 by @glours in docker/compose#14178

## New Contributors
* @dennislapchenko made their first contribution in docker/compose#14088

**Full Changelog**: docker/compose@v5.5.0...v5.5.1
</pre>
  <p>View the full release notes at <a href="https://github.com/docker/compose/releases/tag/v5.5.1">https://github.com/docker/compose/releases/tag/v5.5.1</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!18270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants