mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Update clang-format.yml
This commit is contained in:
parent
f6f0e25674
commit
b382a02ab0
30
.github/workflows/clang-format.yml
vendored
30
.github/workflows/clang-format.yml
vendored
|
@ -24,8 +24,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
path:
|
||||
- check: '.'
|
||||
exclude: '(winlibs|maclibs)' # Exclude file paths containing "hello" or "world"
|
||||
- exclude: 'winlibs|maclibs' # Exclude file paths containing "hello" or "world"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run clang-format style check for C/C++/Protobuf programs.
|
||||
|
@ -35,32 +34,7 @@ jobs:
|
|||
check-path: ${{ matrix.path['check'] }}
|
||||
exclude-regex: ${{ matrix.path['exclude'] }}
|
||||
fallback-style: 'llvm' # optional
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install clang-tidy
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-tidy
|
||||
- name: Prepare compile_commands.json
|
||||
run: |
|
||||
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Create results directory
|
||||
run: |
|
||||
mkdir clang-tidy-result
|
||||
- name: Analyze
|
||||
run: |
|
||||
git diff -U0 HEAD^ | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml
|
||||
- name: Save PR metadata
|
||||
run: |
|
||||
echo ${{ github.event.number }} > clang-tidy-result/pr-id.txt
|
||||
echo ${{ github.event.pull_request.head.repo.full_name }} > clang-tidy-result/pr-head-repo.txt
|
||||
echo ${{ github.event.pull_request.head.ref }} > clang-tidy-result/pr-head-ref.txt
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: clang-tidy-result
|
||||
path: clang-tidy-result/
|
||||
|
||||
clang-format-checking:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
Loading…
Reference in a new issue