Files
esp-matter/tools/ci/format_all.sh
2021-10-25 17:40:18 +08:00

14 lines
335 B
Bash
Executable File

#!/bin/bash
pushd "$(pwd)"
cd "${ESP_MATTER_PATH}"
SRC_FILES="$(find components device_hal examples -regextype posix-egrep -regex ".*\.(c|cpp|cxx|h|hpp|hxx)" |\
grep -v -iE '/gen/|/build/|/zap-generated/')"
for SRC_FILE in ${SRC_FILES}; do
echo "formatting ${SRC_FILE}"
clang-format -i "${SRC_FILE}"
done
popd