action:clang-format

This commit is contained in:
YiFang Xiao 2023-05-16 20:34:28 +08:00 committed by xiaoyifang
parent ced19b9f11
commit e1b844b23d

View file

@ -27,7 +27,13 @@ jobs:
# format the latest commit # format the latest commit
- name: ubuntu install clang-format - name: ubuntu install clang-format
run: | run: |
sudo apt-get install clang-format git sudo apt-get install git lsb-release wget software-properties-common
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh
rm -f llvm.sh
sudo apt-get update
sudo apt-get install -y clang-format
git-clang-format --style=file HEAD^ git-clang-format --style=file HEAD^
git diff --staged git diff --staged