Skip to content

Commit ae935ae

Browse files
committed
add new targets for fix and vet commands
1 parent 084a7de commit ae935ae

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,18 @@ This file provides guidance to AI Agents when working with code in this reposito
5252
### Code Quality and Generation
5353
- `make lint` - Run linter (includes tidy and custom checks)
5454
- `make fix-lint` - Automatically fix linting issues
55+
- `make fix-lint-new` - Automatically fix linting issues for files changed since master
5556
- `make fix-imports` - Automatically fix imports
57+
- `make fix-imports-new` - Automatically fix imports for files changed since master
5658
- `make vet` - Run go vet
59+
- `make vet-new` - Run go vet for files changed since master
5760
- `make generate` - Run all code generators (proto, mocks, fvm wrappers)
5861
- `make generate-mocks` - Generate mocks for unit tests
5962
- `make generate-proto` - Generate protobuf stubs
6063
- `make tidy` - Run go mod tidy
6164
6265
`lint`, `vet`, `fix-lint`, and `fix-imports` support passing `LINT_PATH`, which sets the path used by golangci-lint
6366
- `make lint -e LINT_PATH=./path/to/lint/...` - Run linter for a specific module
64-
- `make lint -e LINT_PATH="./path/to/lint/file1.go ./path/to/lint/file2.go"` - Run linter for a set of paths
6567
6668
### Dependency Management
6769
- `make install-tools` - Install all required development tools

Makefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,26 @@ fix-lint:
257257
# revive -config revive.toml -exclude storage/ledger/trie ./...
258258
./tools/custom-gcl run -v --fix $(or $(LINT_PATH),./...)
259259

260+
.PHONY: fix-lint-new
261+
fix-lint-new:
262+
# revive -config revive.toml -exclude storage/ledger/trie ./...
263+
./tools/custom-gcl run -v --fix --new-from-rev=master
264+
260265
.PHONY: fix-imports
261266
fix-imports:
262-
./tools/custom-gcl run --disable-all --enable=gci --fix $(or $(LINT_PATH),./...)
267+
./tools/custom-gcl run --enable-only=gci --fix $(or $(LINT_PATH),./...)
268+
269+
.PHONY: fix-imports-new
270+
fix-imports-new:
271+
./tools/custom-gcl run --enable-only=gci --fix --new-from-rev=master
263272

264273
.PHONY: vet
265274
vet:
266-
./tools/custom-gcl run --disable-all --enable=govet $(or $(LINT_PATH),./...)
275+
./tools/custom-gcl run --enable-only=govet $(or $(LINT_PATH),./...)
276+
277+
.PHONY: vet-new
278+
vet-new:
279+
./tools/custom-gcl run --enable-only=govet --new-from-rev=master
267280

268281
# Runs unit tests with different list of packages as passed by CI so they run in parallel
269282
.PHONY: ci

0 commit comments

Comments
 (0)