diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c47e90..4b6e3a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,24 +19,24 @@ repos: - repo: local hooks: - - id: cargo-fmt-check - name: Check Rust Formatting - entry: make fmt-check + - id: format + name: Check Code Formatting + entry: make format language: system pass_filenames: false files: \.rs$ stages: [ pre-commit ] - - id: cargo-clippy - name: Run Clippy - entry: make clippy + - id: lint + name: Run Linters + entry: make lint language: system pass_filenames: false files: \.rs$ stages: [ pre-commit ] - - id: cargo-test - name: Run Rust Tests + - id: check + name: Run All Checks entry: make check language: system pass_filenames: false diff --git a/AGENTS.md b/AGENTS.md index 7000e41..44cf7ae 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -232,8 +232,8 @@ The `Makefile` wraps the standard Rust commands and skips Rust checks with a cle For Rust changes, prefer: -1. `make fmt-check` -2. `make clippy` +1. `make format-check` +2. `make lint` 3. `make test` These map to `cargo fmt --all --check`, `cargo clippy --all-targets --all-features -- -D warnings`, and `cargo test --all-targets --all-features`. @@ -299,8 +299,8 @@ Use this review format: Suggested PR checklist: -- [ ] `make fmt-check` passes, if applicable -- [ ] `make clippy` passes, if applicable +- [ ] `make format-check` passes, if applicable +- [ ] `make lint` passes, if applicable - [ ] `make test` passes, if applicable - [ ] Snapshot oracle or expected output included for planner behavior - [ ] Unsupported cases documented diff --git a/Makefile b/Makefile index 5b3ff9e..86ff83d 100644 --- a/Makefile +++ b/Makefile @@ -9,40 +9,40 @@ help: ## Show help messages for all available targets @grep -E '^[a-zA-Z_-]+:.*## .*$$' Makefile | \ awk 'BEGIN {FS = ":.*## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' -.PHONY: fmt -fmt: ## Format Rust code +.PHONY: format +format: ## Apply code formatting @if [ -z "$(HAS_CARGO)" ]; then \ echo "No Cargo.toml found. Skipping Rust formatting."; \ else \ cargo fmt --all; \ fi -.PHONY: fmt-check -fmt-check: ## Check Rust formatting +.PHONY: format-check +format-check: ## Check code formatting without applying changes @if [ -z "$(HAS_CARGO)" ]; then \ echo "No Cargo.toml found. Skipping Rust format check."; \ else \ cargo fmt --all --check; \ fi -.PHONY: clippy -clippy: ## Run Clippy for all targets and features +.PHONY: lint +lint: ## Run linters across all targets and features @if [ -z "$(HAS_CARGO)" ]; then \ - echo "No Cargo.toml found. Skipping Clippy."; \ + echo "No Cargo.toml found. Skipping lint."; \ else \ cargo clippy --all-targets --all-features -- -D warnings; \ fi .PHONY: test -test: ## Run Rust tests for all targets and features +test: ## Run tests across all targets and features @if [ -z "$(HAS_CARGO)" ]; then \ - echo "No Cargo.toml found. Skipping Rust tests."; \ + echo "No Cargo.toml found. Skipping tests."; \ else \ cargo test --all-targets --all-features; \ fi .PHONY: check -check: fmt-check clippy test ## Run all Rust checks +check: format-check lint test ## Run all checks (format-check, lint, test) .PHONY: clean clean: ## Remove build output diff --git a/crates/geomerge-demo/README.md b/crates/geomerge-demo/README.md index ad3ec8e..144894b 100644 --- a/crates/geomerge-demo/README.md +++ b/crates/geomerge-demo/README.md @@ -3,6 +3,7 @@ This demo shows how to store and read data from Geomerge. The demo: + 1. loads the compiled `paths.json` schema, 2. creates a Geomerge store, 3. inserts a small graph dataset in one transaction,