mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-26 05:56:50 +00:00
chore(dev): streamline local verification gates (#3410)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## —— Code quality and Formatting ------------------------------------------------------------------
|
||||
|
||||
.NOTPARALLEL: fix
|
||||
|
||||
.PHONY: fmt
|
||||
fmt: core-deps fmt-deps ## Format code
|
||||
@echo "🔧 Formatting code..."
|
||||
@@ -13,9 +15,21 @@ fmt-check: core-deps fmt-deps ## Check code formatting
|
||||
.PHONY: clippy-check
|
||||
clippy-check: core-deps ## Run clippy checks
|
||||
@echo "🔍 Running clippy checks..."
|
||||
cargo clippy --fix --allow-dirty
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
.PHONY: clippy-fix
|
||||
clippy-fix: core-deps ## Apply clippy fixes
|
||||
@echo "🔧 Applying clippy fixes..."
|
||||
cargo clippy --fix --allow-dirty
|
||||
|
||||
.PHONY: fix
|
||||
fix: fmt clippy-fix ## Format code and apply clippy fixes
|
||||
|
||||
.PHONY: quick-check
|
||||
quick-check: core-deps ## Run fast workspace compilation check
|
||||
@echo "🔨 Running fast compilation check..."
|
||||
cargo check --workspace --exclude e2e_test
|
||||
|
||||
.PHONY: unsafe-code-check
|
||||
unsafe-code-check: ## Check unsafe_code allowances have SAFETY comments
|
||||
@echo "🔒 Checking unsafe_code allowances..."
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
## —— Pre Commit Checks ----------------------------------------------------------------------------
|
||||
|
||||
.NOTPARALLEL: pre-commit dev-check
|
||||
|
||||
.PHONY: setup-hooks
|
||||
setup-hooks: ## Set up git hooks
|
||||
@echo "🔧 Setting up git hooks..."
|
||||
@@ -7,5 +9,9 @@ setup-hooks: ## Set up git hooks
|
||||
@echo "✅ Git hooks setup complete!"
|
||||
|
||||
.PHONY: pre-commit
|
||||
pre-commit: fmt unsafe-code-check architecture-migration-check logging-guardrails-check clippy-check compilation-check test ## Run pre-commit checks
|
||||
pre-commit: fmt-check unsafe-code-check architecture-migration-check logging-guardrails-check clippy-check test ## Run full pre-commit checks
|
||||
@echo "✅ All pre-commit checks passed!"
|
||||
|
||||
.PHONY: dev-check
|
||||
dev-check: fmt-check unsafe-code-check architecture-migration-check logging-guardrails-check quick-check ## Run fast local development checks
|
||||
@echo "✅ Fast development checks passed!"
|
||||
|
||||
Reference in New Issue
Block a user