Created
July 1, 2025 14:54
-
-
Save bjtitus/9722630ef2d45a66ede87a51ef58df61 to your computer and use it in GitHub Desktop.
Swiftlint autocorrect for Claude Code Hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hooks": { | |
"PostToolUse": [ | |
{ | |
"matcher": "Write|Edit|MultiEdit", | |
"hooks": [ | |
{ | |
"type": "command", | |
"command": "jq -r '.tool_input.file_path' | grep '\\.swift$' && swiftlint --fix \"$(jq -r '.tool_input.file_path')\" || true" | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment