未验证 提交 4b68c11c 编写于 作者: T Twice 提交者: GitHub

check: fix clang-tidy-diff commands (#5972)

* check: fix clang-tidy-diff commands

* CI: fix step names
Co-authored-by: Noneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
上级 33610c63
......@@ -50,7 +50,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON
cmake --build . -j$(nproc) --target of_git_version oneflow_deps generate_functional of_cfgobj generate_py_cfg
- name: Run Maybe-related checks by clang-tidy
- name: Run clang-tidy for all translation units
# use clang as compiler for correct compiler flags
run: |
cd build
......
......@@ -749,7 +749,7 @@ jobs:
run: |
git remote add upstream https://github.com/Oneflow-Inc/oneflow
git fetch upstream
- name: Run Maybe-related checks by clang-tidy
- name: Run clang-tidy for modified files
# use clang as compiler for correct compiler flags
run: |
cd build
......
......@@ -91,7 +91,7 @@ if __name__ == "__main__":
downloaded = download(args.build_dir)
promises = [
run_command(
f"cd .. && git diff -U0 master | {downloaded[1]} -clang-tidy-binary {downloaded[0]} -path {args.build_dir} -quiet -j $(nproc) -p1"
f"cd .. && git diff -U0 master | {downloaded[1]} -clang-tidy-binary {downloaded[0]} -path {args.build_dir} -j $(nproc) -p1 -allow-enabling-alpha-checkers -extra-arg=-Xclang -extra-arg=-analyzer-config -extra-arg=-Xclang -extra-arg=aggressive-binary-operation-simplification=true"
)
]
loop.run_until_complete(asyncio.gather(*promises))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册