Skip to content

Add go mod tidy -diff to CI to ensure go modules files remain tidy#423

Merged
jeffwidman merged 1 commit intomainfrom
add-go-mod-tidy-check
Apr 17, 2025
Merged

Add go mod tidy -diff to CI to ensure go modules files remain tidy#423
jeffwidman merged 1 commit intomainfrom
add-go-mod-tidy-check

Conversation

@jeffwidman
Copy link
Member

go mod tidy -diff ensures the go.mod and go.sum files remain correct. If anything is amiss, it will print the diff along with an error code and then exit.

@jeffwidman jeffwidman requested a review from a team as a code owner April 11, 2025 22:02
@jeffwidman jeffwidman force-pushed the add-go-mod-tidy-check branch from b063325 to 072332e Compare April 11, 2025 22:33
`go mod tidy -diff` ensures the `go.mod` and `go.sum` files remain
correct. If anything is amiss, it will print the diff along with an
error code and then exit.
@jeffwidman jeffwidman force-pushed the add-go-mod-tidy-check branch from 072332e to bc21429 Compare April 11, 2025 22:35

- name: Run go vet
run: go vet ./...
- run: go mod tidy -diff
Copy link
Member Author

Choose a reason for hiding this comment

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

This line is the only non-cosmetic change

@jeffwidman jeffwidman changed the title Ensure go modules files remain tidy Add go mod tidy -diff to CI to ensure go modules files remain tidy Apr 17, 2025
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

LGTM

@jeffwidman jeffwidman added this pull request to the merge queue Apr 17, 2025
Merged via the queue into main with commit dc3fe91 Apr 17, 2025
76 checks passed
@jeffwidman jeffwidman deleted the add-go-mod-tidy-check branch April 17, 2025 18:28
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.

2 participants