FEX/Scripts/reformat.sh
Paulo Matos 00b81c8cbc Clang Format file and reformat target
Adds paths to ignore to clang-format, .clang-format file.
Also a wrapper script to clang-format to read .clang-format-ignore.

To format the whole tree at the root of the repository run:
`find . -iname '*.h' -o -iname '*.cpp' -exec python3 Scripts/clang-format.py -i \{\} \;`

Add reformat target to reformat the whole tree
2024-04-16 13:48:44 +02:00

15 lines
303 B
Bash
Executable File

#! /bin/bash
# Save current directory
DIR=$(pwd)
# Change to the directory passed as argument if any
if [ $# -eq 1 ]; then
cd $1
fi
# Reformat whole tree.
# This is run by the reformat target.
git ls-files -z '*.cpp' '*.h' | xargs -0 -n 1 -P $(nproc) python3 Scripts/clang-format.py -i
cd $DIR