Run the ECC formatter quality gate for a single file and report remediation steps.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-ecc-f0e5acbaf420 ,按照其中的说明把「quality-gate」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Operator entry point for the formatter quality gate that normally runs as the
post:quality-gate PostToolUse hook (scripts/hooks/quality-gate.js).
The gate is a single-file formatter check driven by hook input, not CLI flags:
tool_input.file_path); it does not take a path argument.ECC_QUALITY_GATE_FIX=true - apply formatting fixes instead of check-onlyECC_QUALITY_GATE_STRICT=true - log formatter failures as gate failures.ts/.tsx/.js/.jsx/.json/.md - Biome check or Prettier --check,
whichever the project ships (JS/TS under Biome is skipped here because
post-edit-format already runs biome check --write).go - gofmt.py - ruff formatverification-loop
skill or the language verification skills for lint/type/test pipelines.To run the gate manually against one file, pipe hook-style JSON into the script (set the env toggles first if you want fix or strict behavior):
echo '{"tool_input":{"file_path":"src/example.ts"}}' \
| ECC_QUALITY_GATE_FIX=true node scripts/hooks/quality-gate.js
Then report formatter findings and concrete remediation steps.
Hook wiring enters through the async PostToolUse dispatcher in
hooks/hooks.json. Its internal registry preserves the post:quality-gate
ID and the standard/strict profiles.
$ARGUMENTS:
[path] optional file to check. The script itself takes no CLI
arguments - when a path is given, substitute it as tool_input.file_path
in the stdin JSON shown above before running the command