aboutsummaryrefslogtreecommitdiff
path: root/tools/format-code.sh
blob: 68be1d8092fa2ad6a48c7b7b0db3d575fbbb01b8 (plain)
1
2
3
4
#!/bin/bash

# get names of staged files | filter out the header and cpp files | clang-format them
git diff --staged --name-only | grep --regex="\.h\|\.cpp" | xargs clang-format -i