chore: improve linting configuration and dev tooling#7
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors Go linting and dev-tooling to support PR-incremental linting and add module tidiness checks, aiming for more flexible local/CI workflows.
Changes:
- Moves “new issues only” golangci-lint behavior from
.golangci.yamlintomake/CI via--new-from-rev. - Adds
go mod tidy/go mod tidy -difftofix/checkto keepgo.mod/go.sumtidy. - Updates devcontainer and CI to download module deps earlier.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
Makefile |
Adds NEW_FROM_REV and applies --new-from-rev to lint/fix; adds go mod tidy and a tidy diff check. |
AGENTS.md |
Updates make check description wording (but command examples now need alignment with Makefile changes). |
.golangci.yaml |
Removes config-based incremental lint settings so CLI can control it. |
.github/workflows/pr-check.yml |
Passes NEW_FROM_REV=origin/${{ github.base_ref }} to limit lint to PR-introduced issues. |
.devcontainer/post_create.sh |
Adds go mod download before installing Go dev tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d9bc1de to
65af58e
Compare
65af58e to
984e34e
Compare
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.
Summary
Refactors linting and dev tooling setup for better flexibility and correctness.
Changes
.devcontainer/post_create.sh: Addgo mod downloadbefore installing dev tools to ensure dependencies are available..github/workflows/pr-check.yml: PassNEW_FROM_REV=origin/${{ github.base_ref }}tomake checkso CI only reports lint issues introduced by the PR..golangci.yaml: Removenew: trueandnew-from-rev: HEAD~from config — incremental lint is now controlled via CLI flag for greater flexibility.Makefile:NEW_FROM_REV ?= HEADvariable (defaults toHEADfor local use)--new-from-rev=$(NEW_FROM_REV)tolintandfixtargetsgo mod tidytofixtargetgo mod tidy -difftochecktarget to verifygo.mod/go.sumare tidyAGENTS.md: Updatemake checkdescription to reflect actual behavior.