chore: keep cmd/dockerflagsgen tidy with the root module - #165
Merged
Merged
Conversation
cmd/dockerflagsgen replaces github.com/bare-devcontainer/decolint with a local path, so the root module's requirements are part of its build list. Bumping golang.org/x/sys to v0.48.0 in the root go.mod left this module requiring v0.47.0, and `go test` refused to run with "updates to go.mod needed", failing the dockerflags job. Tidy it. Renovate's gomodTidy only tidies the module it updated, which is why this kept drifting. gomodTidyAll also tidies every module that depends on the updated one through a local replace directive, and covers the updated module itself. https://docs.renovatebot.com/configuration-options/#postupdateoptions Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
dockerflagsjob is red onmain, and therefore on every PR branchedfrom it (including #164, whose own diff only touches an action SHA):
cmd/dockerflagsgenreplacesgithub.com/bare-devcontainer/decolintwith alocal path, so the root module's requirements are part of its build list.
#163 bumped
golang.org/x/systo v0.48.0 in the rootgo.modwhilecmd/dockerflagsgen/go.modstill required v0.47.0, andgo testrefuses torun against a stale
go.mod.Changes
go mod tidyincmd/dockerflagsgen—golang.org/x/sysv0.47.0 → v0.48.0in
go.modandgo.sum.postUpdateOptions:gomodTidy→gomodTidyAll.gomodTidyonlytidies the module Renovate updated, which is why
cmd/dockerflagsgenkeptbeing left behind.
gomodTidyAlladditionally runsgo mod tidyon everymodule that depends on the updated one through a local
replacedirective,and covers the updated module itself — so a future root bump lands in the
same PR as the matching
cmd/dockerflagsgenupdate.Source:
postUpdateOptionsin the Renovate configuration reference;gomodTidyAllis in therenovate-schema.jsonthis config already$schema-references. It must not be combined withgomodMassage, which thisconfig does not use.
Verification
make dockerflags-test— passesmake dockerflags+git diff --exit-code dockerargs/runflags.go— no diffmake test— passesmake lint— 0 issuesrenovate-config-validator— config validated successfullyNo Go source changed, so coverage is unaffected.
🤖 Generated with Claude Code
Generated by Claude Code