Ensure complete compliance with code quality standards. Use before commit, before PR creation, or when quality issues are detected.
Ensure complete compliance with code quality standards.
Quality commands are loaded from .claude/workflow-config.json:
{
"quality": {
"lint": "uv run ruff check --fix .",
"format": "uv run ruff format .",
"typecheck": "uv run mypy .",
"test": "uv run pytest",
"all": "uv run ruff check --fix . && uv run ruff format . && uv run mypy ."
}
}
Ruff Linter
uv run ruff check .
uv run ruff check --fix . # Auto-fix
Ruff Formatter
uv run ruff format --check .
uv run ruff format . # Auto-format
Mypy Type Checker
uv run mypy .
uv run ruff check --fix . && uv run ruff format . && uv run mypy .
PASS condition: All checks complete without errors
✓ ruff check: 0 errors
✓ ruff format: No changes needed
✓ mypy: Success: no issues found
FAIL condition: Any check has errors → Block commit/PR creation
## Code Quality Gate Report
### Check Results
| Tool | Status | Details |
|------|--------|---------|
| ruff check | ✓ PASS | 0 errors |
| ruff format | ✓ PASS | No changes |
| mypy | ✓ PASS | No issues |
### Overall Result: PASS
## Code Quality Gate Report
### Check Results
| Tool | Status | Details |
|------|--------|---------|
| ruff check | ✗ FAIL | 3 errors |
| ruff format | ✓ PASS | No changes |
| mypy | ✗ FAIL | 2 issues |
### Details
#### ruff check errors:
- src/auth.py:10: E501 line too long
- src/auth.py:20: F401 unused import
#### mypy issues:
- src/auth.py:15: error: Incompatible types
### Overall Result: FAIL
Commit blocked. Please fix the issues above.
Before committing code:
Check if quality gate is enabled
.claude/workflow-config.jsonworkflow.quality_gate_requiredIf enabled:
quality.all commandAuto-fix behavior:
ruff check --fix automatically fixes many issuesruff format automatically formats codeuv run ruff check --fix . && uv run ruff format . && uv run mypy .
npm run lint -- --fix && npm run format && npm run typecheck
golangci-lint run --fix && go fmt ./... && go vet ./...
cargo clippy --fix --allow-dirty --allow-staged && cargo fmt && cargo check