Skip to content

chore: improve linting configuration and dev tooling#7

Merged
min0625 merged 1 commit into
mainfrom
chore/improve-lint-and-dev-tooling
Apr 21, 2026
Merged

chore: improve linting configuration and dev tooling#7
min0625 merged 1 commit into
mainfrom
chore/improve-lint-and-dev-tooling

Conversation

@min0625

@min0625 min0625 commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

Refactors linting and dev tooling setup for better flexibility and correctness.

Changes

  • .devcontainer/post_create.sh: Add go mod download before installing dev tools to ensure dependencies are available.
  • .github/workflows/pr-check.yml: Pass NEW_FROM_REV=origin/${{ github.base_ref }} to make check so CI only reports lint issues introduced by the PR.
  • .golangci.yaml: Remove new: true and new-from-rev: HEAD~ from config — incremental lint is now controlled via CLI flag for greater flexibility.
  • Makefile:
    • Add NEW_FROM_REV ?= HEAD variable (defaults to HEAD for local use)
    • Apply --new-from-rev=$(NEW_FROM_REV) to lint and fix targets
    • Add go mod tidy to fix target
    • Add go mod tidy -diff to check target to verify go.mod/go.sum are tidy
  • AGENTS.md: Update make check description to reflect actual behavior.

Copilot AI review requested due to automatic review settings April 21, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.yaml into make/CI via --new-from-rev.
  • Adds go mod tidy/go mod tidy -diff to fix/check to keep go.mod/go.sum tidy.
  • 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.

Comment thread .github/workflows/pr-check.yml
Comment thread AGENTS.md
Comment thread Makefile Outdated
Comment thread Makefile
@min0625 min0625 force-pushed the chore/improve-lint-and-dev-tooling branch from d9bc1de to 65af58e Compare April 21, 2026 18:13
@min0625 min0625 force-pushed the chore/improve-lint-and-dev-tooling branch from 65af58e to 984e34e Compare April 21, 2026 18:16
@min0625 min0625 merged commit 70d5000 into main Apr 21, 2026
3 checks passed
@min0625 min0625 deleted the chore/improve-lint-and-dev-tooling branch April 21, 2026 18:17
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