Add automatic check for not using nullptr etc in 3.2 branch

This is similar to the check in master but here it checks that the C++
keywords are not used, as we still support C++98 in this branch.
This commit is contained in:
Vadim Zeitlin 2023-01-31 15:06:47 +01:00
parent 43994dddbd
commit dc9baf6426

View File

@ -74,3 +74,22 @@ jobs:
- name: Check for mixed EOL - name: Check for mixed EOL
run: | run: |
./misc/scripts/check_mixed_eol.sh ./misc/scripts/check_mixed_eol.sh
check-cxx-style:
runs-on: ubuntu-20.04
name: Check C++ Style
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check for C++11 keywords
run: |
git fetch --depth=1 origin master
if git diff origin/master \
':!.github/workflows/code_checks.yml' \
':!src/stc/scintilla/' \
| grep -E '(override|noexcept|nullptr[^_])'; then
echo "::error ::Please use C++98 equivalents of the C++11 keywords in this branch."
exit 1
fi