mirror of
https://github.com/verilator/verilator.git
synced 2025-01-03 21:27:35 +00:00
Use yapf3 and add to CI
This commit is contained in:
parent
ec4e408b2b
commit
457e926168
4
.github/workflows/clang-format.yml
vendored
4
.github/workflows/clang-format.yml
vendored
@ -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: |
|
||||
|
@ -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 \
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user