-
-
Notifications
You must be signed in to change notification settings - Fork 65
48 lines (48 loc) · 1.34 KB
/
clang-tidy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#name: clang-tidy
#
#on:
# pull_request:
# branches:
# - main
# - develop
# paths:
# - '**.cpp'
# - '**.h'
#
# workflow_dispatch:
#
#jobs:
# build_and_test:
# if: contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
# name: Run clang-tidy on pull request
# runs-on: ubuntu-latest
#
# steps:
# - name: Install Linux Deps
# if: runner.os == 'Linux'
# run: |
# sudo apt-get update
# sudo apt install clang-tidy
#
# - name: Checkout code
# uses: actions/checkout@v2
# with:
# persist-credentials: false
# fetch-depth: 0
#
# - name: Run clang-tidy
# shell: bash
# working-directory: ${{github.workspace}}/Plugin
# run: find Source -iname "*.cpp" -not -path "Source/Headless*" | xargs clang-tidy > tidy_log.txt && status=0 || status=1
#
# - name: Check results
# shell: bash
# working-directory: ${{github.workspace}}/Plugin
# run: |
# num_failures=$(grep "" -c tidy_log.txt)
# num_ignore=$(echo $(($(grep "file not found" -c tidy_log.txt)*3)))
# num_actual=$(($num_failures - $num_ignore))
# if [ "$num_actual" -gt 1 ]; then
# more tidy_log.txt
# exit 1
# fi