Use yapf3 and add to CI

This commit is contained in:
Wilson Snyder 2020-12-18 22:54:06 -05:00
parent ec4e408b2b
commit 457e926168
3 changed files with 6 additions and 5 deletions

View File

@ -27,14 +27,14 @@ jobs:
CI_BUILD_STAGE_NAME: build
run: |
bash ci/ci-install.bash &&
sudo apt-get install clang-10 &&
sudo apt-get install clang-10 yapf3 &&
git config --global user.email "action@example.com" &&
git config --global user.name "github action"
- name: Format code
run: |
autoconf &&
./configure &&
make clang-format CLANGFORMAT=clang-format-10 &&
make -j 2 format CLANGFORMAT=clang-format-10 &&
git status
- name: Push
run: |

View File

@ -472,7 +472,7 @@ clang-format:
|| echo "*** You are not using clang-format 10.0, indents may differ from master's ***"
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
YAPF = yapf
YAPF = yapf3
YAPF_FLAGS = -i
YAPF_FILES = \
nodist/fuzzer/actual_fail \

View File

@ -409,8 +409,9 @@ style indentation; the `c-set-style` undoes that.)
* Comment every member variable.
Indentation is automatically maintained with "make clang-format" (using
clang-format version 10.0.0). For those manually formatting:
Indentation is automatically maintained with "make format" using
clang-format version 10.0.0, and yapf for python, and is automatically
corrected in the CI actions. For those manually formatting C++ code:
* Use 4 spaces per level, and no tabs.