Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ mise trust .

mise install

mise exec -- go mod download

mise exec -- go install -v golang.org/x/tools/gopls@latest
mise exec -- go install -v github.com/go-delve/delve/cmd/dlv@latest
6 changes: 3 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check:
name: Lint & Test
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -21,5 +21,5 @@ jobs:
- name: Download Go dependencies
run: go mod download

- name: Run check (lint + test)
run: make check
- name: Run check
run: make check NEW_FROM_REV=origin/${{ github.base_ref }}
2 changes: 0 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ run:
timeout: 5m

issues:
new: true
whole-files: true
new-from-rev: HEAD~
max-same-issues: 50

severity:
Expand Down
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ All commands should be run from the repository root.

| Command | Description |
|---------|-------------|
| `make fmt` | Format all Go source files via `golangci-lint fmt` |
| `make lint` | Run linter (`golangci-lint run`) |
| `make fix` | Run linter with auto-fix (`golangci-lint run --fix`) |
| `make test` | Run all tests with race detector (`go test -v -race -failfast ./...`) |
Expand All @@ -62,7 +61,6 @@ Always run `make check` before considering a change complete.
### Code Style

- Follow standard Go conventions (`gofmt`, `goimports`).
- Use `make fmt` to format code; do not manually reformat.
- Exported symbols must have GoDoc comments. Keep them concise and consistent with the existing style.
- Internal helpers (unexported) should be commented only when non-obvious.

Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
fmt:
golangci-lint fmt -v ./...
NEW_FROM_REV ?= HEAD

fix:
golangci-lint run -v --fix ./...
go mod tidy
golangci-lint run -v --new-from-rev=$(NEW_FROM_REV) --fix ./...

lint:
golangci-lint run -v ./...
golangci-lint run -v --new-from-rev=$(NEW_FROM_REV) ./...
Comment thread
min0625 marked this conversation as resolved.

test:
go test -v -race -failfast ./...

check: lint test
check-tidy:
go mod tidy -diff

check: check-tidy lint test