Add rule/config files for Cursor, Cline, Codex, Gemini, Continue, and OpenCode editors pointing them to project conventions, UBS usage, and AGENTS.md. Add a Claude Code on-file-write hook that runs UBS on supported source files after every save. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
490 B
Bash
Executable File
13 lines
490 B
Bash
Executable File
#!/bin/bash
|
|
# Ultimate Bug Scanner - Claude Code Hook
|
|
# Runs on every file save for UBS-supported languages (JS/TS, Python, C/C++, Rust, Go, Java, Ruby)
|
|
|
|
if [[ "$FILE_PATH" =~ \.(js|jsx|ts|tsx|mjs|cjs|py|pyw|pyi|c|cc|cpp|cxx|h|hh|hpp|hxx|rs|go|java|rb)$ ]]; then
|
|
echo "🔬 Running bug scanner..."
|
|
if ! command -v ubs >/dev/null 2>&1; then
|
|
echo "⚠️ 'ubs' not found in PATH; install it before using this hook." >&2
|
|
exit 0
|
|
fi
|
|
ubs "${PROJECT_DIR}" --ci 2>&1 | head -50
|
|
fi
|