Files
wehub-resource-sync d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:55 +08:00

1.8 KiB

description
description
Run the ECC formatter quality gate for a single file and report remediation steps.

Quality Gate Command

Operator entry point for the formatter quality gate that normally runs as the post:quality-gate PostToolUse hook (scripts/hooks/quality-gate.js).

How it actually works

The gate is a single-file formatter check driven by hook input, not CLI flags:

  • The script reads the target from the hook's stdin JSON (tool_input.file_path); it does not take a path argument.
  • Behavior toggles are environment variables:
    • ECC_QUALITY_GATE_FIX=true - apply formatting fixes instead of check-only
    • ECC_QUALITY_GATE_STRICT=true - log formatter failures as gate failures
  • Coverage by file type:
    • .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 format
  • Lint and type checks are not part of this gate. Use the verification-loop skill or the language verification skills for lint/type/test pipelines.

Usage

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.

Notes

Hook wiring lives in hooks/hooks.json (post:quality-gate, profiles standard/strict via run-with-flags.js).

Arguments

$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