mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22: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
|
CI_BUILD_STAGE_NAME: build
|
||||||
run: |
|
run: |
|
||||||
bash ci/ci-install.bash &&
|
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.email "action@example.com" &&
|
||||||
git config --global user.name "github action"
|
git config --global user.name "github action"
|
||||||
- name: Format code
|
- name: Format code
|
||||||
run: |
|
run: |
|
||||||
autoconf &&
|
autoconf &&
|
||||||
./configure &&
|
./configure &&
|
||||||
make clang-format CLANGFORMAT=clang-format-10 &&
|
make -j 2 format CLANGFORMAT=clang-format-10 &&
|
||||||
git status
|
git status
|
||||||
- name: Push
|
- name: Push
|
||||||
run: |
|
run: |
|
||||||
|
@ -472,7 +472,7 @@ clang-format:
|
|||||||
|| echo "*** You are not using clang-format 10.0, indents may differ from master's ***"
|
|| echo "*** You are not using clang-format 10.0, indents may differ from master's ***"
|
||||||
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||||
|
|
||||||
YAPF = yapf
|
YAPF = yapf3
|
||||||
YAPF_FLAGS = -i
|
YAPF_FLAGS = -i
|
||||||
YAPF_FILES = \
|
YAPF_FILES = \
|
||||||
nodist/fuzzer/actual_fail \
|
nodist/fuzzer/actual_fail \
|
||||||
|
@ -409,8 +409,9 @@ style indentation; the `c-set-style` undoes that.)
|
|||||||
|
|
||||||
* Comment every member variable.
|
* Comment every member variable.
|
||||||
|
|
||||||
Indentation is automatically maintained with "make clang-format" (using
|
Indentation is automatically maintained with "make format" using
|
||||||
clang-format version 10.0.0). For those manually formatting:
|
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.
|
* Use 4 spaces per level, and no tabs.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user