Skip to content

chore: add go mod tidy to hk/lint checks - #1462

Merged
joelmccoy merged 1 commit into
mainfrom
add-go-mod-tidy-check
Aug 20, 2026
Merged

joelmccoy merged 1 commit into
mainfrom
add-go-mod-tidy-check

Conversation

@joelmccoy

@joelmccoy joelmccoy commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Description

Adds go mod tidy check to hk/lint checks.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@joelmccoy
joelmccoy requested a review from a team as a code owner August 20, 2026 16:53
Copilot AI lite review requested due to automatic review settings August 20, 2026 16:53

Copilot AI 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.

Pull request overview

Adds a go mod tidy verification step to the repository’s hk hook configuration so module metadata stays consistent during hk check --all / uds run lint runs.

Changes:

  • Introduces a new go-mod-tidy hook step that checks go mod tidy cleanliness via go mod tidy -diff.
  • Adds a corresponding auto-fix command (go mod tidy) and scopes execution to Go/module files.

πŸ’‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bradclawsie bradclawsie 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.

seems fine but what is our intent for updating pkgs? I usually do go mod tidy to its own PR, done only periodically

@joelmccoy

Copy link
Copy Markdown
Member Author

seems fine but what is our intent for updating pkgs? I usually do go mod tidy to its own PR, done only periodically

renovate already does this in it's prs (runs go mod tidy). however if you add a feature that adds a dep/bumps it we have no lint check as it currently stands to do this (i caught this with my import work). this should be a check and we should never have any non tidy go mod/sum files checked in

@joelmccoy
joelmccoy merged commit cb4054c into main Aug 20, 2026
24 checks passed
@joelmccoy
joelmccoy deleted the add-go-mod-tidy-check branch August 20, 2026 17:33
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.

3 participants