1 2 3 4 5
#!/bin/bash file_path=$(jq -r '.tool_input.file_path') if [[ "$file_path" =~ \.(c|h|cpp|hpp)$ ]]; then clang-format -i "$file_path" fi