Loading...
Loading...
Compare original and translation side by side
helptestbuildcleanstartstoplinthelptestbuildcleanstartstoplintMakefileMakefile| Target | Purpose |
|---|---|
| Display available targets (default goal) |
| Run test suite |
| Build project artifacts |
| Remove temporary files and build artifacts |
| Run linters |
| Target | When Required |
|---|---|
| If project has runnable service |
| If project has background service |
| If project uses auto-formatters |
| Target | 用途 |
|---|---|
| 显示可用目标(默认目标) |
| 运行测试套件 |
| 构建项目产物 |
| 删除临时文件和构建产物 |
| 运行代码检查工具 |
| Target | 适用场景 |
|---|---|
| 若项目包含可运行服务 |
| 若项目包含后台服务 |
| 若项目使用自动格式化工具 |
| Check | Standard | Severity |
|---|---|---|
| File exists | Makefile present | FAIL if missing |
| Default goal | | WARN if missing |
| PHONY declarations | All targets marked | WARN if missing |
| Colored output | Color variables defined | INFO |
| Help target | Auto-generated from comments | WARN if missing |
| Language-specific | Commands match project type | FAIL if mismatched |
| 检查项 | 标准 | 严重程度 |
|---|---|---|
| 文件存在 | 存在Makefile | 缺失则失败 |
| 默认目标 | 配置 | 缺失则警告 |
| PHONY声明 | 所有目标均标记为 | 缺失则警告 |
| 彩色输出 | 定义颜色变量 | 提示信息 |
| Help目标 | 从注释自动生成 | 缺失则警告 |
| 语言适配 | 命令与项目类型匹配 | 不匹配则失败 |
Makefile Compliance Report
==============================
Project Type: python (detected)
Makefile: Found
Target Status:
help ✅ PASS
test ✅ PASS (uv run pytest)
build ✅ PASS (docker build)
clean ✅ PASS
lint ✅ PASS (uv run ruff check)
format ✅ PASS (uv run ruff format)
start ❌ FAIL (missing)
stop ❌ FAIL (missing)
Makefile Checks:
Default goal ✅ PASS (.DEFAULT_GOAL := help)
PHONY declarations ✅ PASS
Colored output ✅ PASS
Help target ✅ PASS (auto-generated)
Missing Targets: start, stop
Issues: 2 foundMakefile合规性报告
==============================
项目类型:python(已检测)
Makefile:已找到
目标状态:
help ✅ 通过
test ✅ 通过(uv run pytest)
build ✅ 通过(docker build)
clean ✅ 通过
lint ✅ 通过(uv run ruff check)
format ✅ 通过(uv run ruff format)
start ❌ 失败(缺失)
stop ❌ 失败(缺失)
Makefile检查:
默认目标 ✅ 通过(.DEFAULT_GOAL := help)
PHONY声明 ✅ 通过
彩色输出 ✅ 通过
Help目标 ✅ 通过(自动生成)
缺失目标:start、stop
问题:发现2处--fix.DEFAULT_GOAL.PHONY--fix.DEFAULT_GOAL.PHONY.project-standards.yamlcomponents:
makefile: "2025.1".project-standards.yamlcomponents:
makefile: "2025.1"undefinedundefinedundefinedundefinedlint:
@uv run ruff check .
format:
@uv run ruff format .
test:
@uv run pytest
build:
@docker build -t {{PROJECT_NAME}} .
clean:
@find . -type f -name "*.pyc" -delete
@find . -type d -name "__pycache__" -delete
@rm -rf .pytest_cache .ruff_cache dist/ build/lint:
@npm run lint
format:
@npm run format
test:
@npm test
build:
@npm run build
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf node_modules/ dist/ .next/ .turbo/lint:
@cargo clippy -- -D warnings
format:
@cargo fmt
test:
@cargo nextest run
build:
@cargo build --release
@docker build -t {{PROJECT_NAME}} .
clean:
@cargo cleanlint:
@golangci-lint run
format:
@gofmt -s -w .
test:
@go test ./...
build:
@go build -o bin/{{PROJECT_NAME}}
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf bin/ dist/
@go cleanlint:
@uv run ruff check .
format:
@uv run ruff format .
test:
@uv run pytest
build:
@docker build -t {{PROJECT_NAME}} .
clean:
@find . -type f -name "*.pyc" -delete
@find . -type d -name "__pycache__" -delete
@rm -rf .pytest_cache .ruff_cache dist/ build/lint:
@npm run lint
format:
@npm run format
test:
@npm test
build:
@npm run build
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf node_modules/ dist/ .next/ .turbo/lint:
@cargo clippy -- -D warnings
format:
@cargo fmt
test:
@cargo nextest run
build:
@cargo build --release
@docker build -t {{PROJECT_NAME}} .
clean:
@cargo cleanlint:
@golangci-lint run
format:
@gofmt -s -w .
test:
@go test ./...
build:
@go build -o bin/{{PROJECT_NAME}}
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf bin/ dist/
@go cleanpyproject.tomlrequirements.txtpackage.jsonCargo.tomlgo.moddocker-compose.ymlDockerfilesrc/server.*src/main.*pyproject.tomlrequirements.txtpackage.jsonCargo.tomlgo.moddocker-compose.ymlDockerfilesrc/server.*src/main.*| Flag | Description |
|---|---|
| Report status without offering fixes |
| Apply fixes automatically |
| 参数 | 说明 |
|---|---|
| 仅报告状态,不提供修复选项 |
| 自动应用修复 |
undefinedundefinedundefinedundefined/configure:all/configure:workflows/configure:dockerfile/configure:all/configure:workflows/configure:dockerfile