mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-07-29 23:48:49 +02:00
fix(hooks): apply review fixes dropped by squash merge
The squash merge of PR #49 discarded two review fix commits. Re-applying: - security-scan.sh: wrap output in hookSpecificOutput (PostToolUse protocol); restore secret/token detection; fix JSON newline escaping; escape file path - validate-prompt.sh: try "user_prompt" field first, fall back to "prompt" - log-bash.sh: document sed truncation limitation for quoted commands - format-code.sh: fix misleading comment about updatedInput output
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
# Auto-format code before writing
|
||||
# Hook: PreToolUse:Write
|
||||
#
|
||||
# Reads the target file path from stdin JSON and runs the appropriate formatter.
|
||||
# Outputs updatedInput to pass the formatted content back.
|
||||
# Reads the target file path from stdin JSON and runs the appropriate formatter
|
||||
# in-place on the existing file (if it already exists on disk). For new files,
|
||||
# formatting runs after Claude writes the file via a subsequent PostToolUse hook.
|
||||
#
|
||||
# Compatible with: macOS, Linux, Windows (Git Bash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user