forked from wxWidgets/wxWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (81 loc) · 2.54 KB
/
code_checks.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# This workflow does some quick checks.
name: Code Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
check-unix:
runs-on: ubuntu-20.04
name: Check Spelling
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install codespell
run: |
pip3 install --no-warn-script-location codespell==1.17.1
- name: Run codespell
run: |
CODESPELL=$HOME/.local/bin/codespell ./misc/scripts/spellcheck
check-whitespace:
runs-on: ubuntu-20.04
name: Check Whitespace
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for trailing whitespace and TABs
run: |
git fetch --depth=1 origin master
git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol,tab-in-indent \
diff --check origin/master \
':!.gitmodules' \
':!Makefile.in' \
':!config.guess' \
':!config.sub' \
':!configure' \
':!**/descrip.mms' \
':!install-sh' \
':!build/autogen.mk' \
':!build/bakefiles/make_dist.mk' \
':!build/bakefiles/scintilla.bkl' \
':!docs/doxygen/doxygen-awesome-css/*' \
':!samples/widgets/widgets.bkl' \
':!tests/test.bkl' \
':!**/*akefile*' \
':!**/*.pbxproj' \
':!**/Info*.plist*' \
':!**/*.sln' \
':!**/*.vcproj' \
':!**/*.xpm'
check-mixed-eol:
runs-on: ubuntu-20.04
name: Check Mixed EOL
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dos2unix
run: |
sudo apt-get install -y dos2unix
- name: Check for mixed EOL
run: |
./misc/scripts/check_mixed_eol.sh
check-cxx-style:
runs-on: ubuntu-20.04
name: Check C++ Style
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for obsolete macros use
run: |
git fetch --depth=1 origin master
if git diff origin/master \
':**.h' ':**.cpp' \
| grep -E '^\+.*(wxOVERRIDE|wxNOEXCEPT|wxMEMBER_DELETE|__WXFUNCTION__|[^"_@A-Za-z0-9]NULL([- ,;()+*/%&=!?]|$))'; then
echo "::error ::Please use C++11 equivalents of the deprecated macros in the new code."
exit 1
fi