Files
rippled/clang_format.sh
pwang200 a98269f049 a batch of memory, table, and trap tests (#6100)
wasm memory, table, and trap unit tests
2026-01-06 14:03:18 -05:00

19 lines
402 B
Bash
Executable File

#!/bin/bash
modified=$1
dir=`pwd`
clangf=clang-format-10
clangf=clang-format
if [ "$1" = "--all" ]
then
modified=`git status|egrep "modified|new file"|egrep "(cpp|h)$" | sed -E -e 's/modified://' -e 's/new file://' -e 's/^[[:space:]]+//'`
fi
for i in $modified
do
basedir=$(dirname "$i")
file=$(basename "$i")
echo "$basedir $file"
cd $basedir
$clangf -style=file -i "$file"
cd $dir
done