hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
 
# Format C/C++ source
# sudo apt install clang-format
find . -regex '.*\.\(cpp\|hpp\|cu\|c\|h\)' -exec clang-format -i {} \;
 
# Format Python source
# pip3 install yapf
find . -iname '*.py' -exec python3 -m yapf --in-place --recursive --style="{indent_width: 4}" {} \;
 
# Format Android.bp
# bpfmt is provided in AOSP
bpfmt -w .