mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-22 00:56:18 +00:00
Build out of tree so clang-tidy sees changed src lines
In-tree builds pass relative names that clang-tidy-diff's line filter cannot match.
This commit is contained in:
@@ -50,16 +50,19 @@ jobs:
|
|||||||
autoconf -i
|
autoconf -i
|
||||||
autoheader
|
autoheader
|
||||||
automake --add-missing
|
automake --add-missing
|
||||||
./configure
|
mkdir build
|
||||||
|
cd build
|
||||||
|
"${GITHUB_WORKSPACE}/configure"
|
||||||
- name: Prepare compile_commands.json
|
- name: Prepare compile_commands.json
|
||||||
run: |
|
run: |
|
||||||
bear -- make
|
cd build
|
||||||
|
bear -- make check TESTS=
|
||||||
- name: Create results directory
|
- name: Create results directory
|
||||||
run: |
|
run: |
|
||||||
mkdir clang-tidy-result
|
mkdir clang-tidy-result
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
run: |
|
run: |
|
||||||
git diff -U0 "$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml "-extra-arg=-include/${PWD}/config.h"
|
git diff -U0 "$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml "-extra-arg=-include/${PWD}/build/config.h"
|
||||||
- name: Save PR metadata
|
- name: Save PR metadata
|
||||||
run: |
|
run: |
|
||||||
echo "${{ github.event.number }}" > clang-tidy-result/pr-id.txt
|
echo "${{ github.event.number }}" > clang-tidy-result/pr-id.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user