File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 python3 -m pip install -U flake8
1919 python3 -m flake8 --exclude=thirdParty .
2020
21+ clang-format :
22+ runs-on : ubuntu-21.04
23+ steps :
24+ - uses : actions/checkout@v2
25+ - name : clang-format
26+ run : |
27+ sudo apt install -y clang-format
28+ .github/workflows/source/clang-format
29+
2130 static-analysis :
2231 runs-on : ubuntu-20.04
2332 steps :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Copyright 2016-2021 Axel Huebl
4+ #
5+ # License: LGPLv3+
6+
7+ # search recursive inside a folder if a file contains tabs
8+ #
9+ # @result 0 if no files are found, else 1
10+ #
11+
12+ __awkscript () {
13+ cat << EOF
14+ BEGIN {
15+ modified = 0;
16+ }
17+
18+ {
19+ if (\$ 1 == "M") {
20+ modified = 1;
21+ }
22+ }
23+ END {
24+ print modified;
25+ }
26+ EOF
27+ }
28+ awkscript=" $( __awkscript) "
29+
30+ ./format.sh
31+ if [[ $? -ne 0 ]]
32+ then
33+ echo " # Unable to format the source tree"
34+ exit 1
35+ fi
36+
37+ modified=" $( git status --short | awk " $awkscript " ) "
38+ if [[ " $modified " -eq 1 ]]
39+ then
40+ cat << EOF
41+ # Code must be formatted by clang-format.
42+ # Use the format.sh script contained in the source tree.
43+ # Bad files:
44+ EOF
45+ git status --short \
46+ | awk ' {if ($1 == "M"){ printf "# %s\n", $2 }}'
47+ exit 1
48+ fi
49+
50+ exit 0
You can’t perform that action at this time.
0 commit comments