Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,29 @@ jobs:
run: |
set -x
sudo apt-get -q update
sudo apt-get --yes install cppcheck shellcheck
sudo apt-get --yes install cppcheck
- name: Cppcheck
continue-on-error: true
run: |
set -x
scripts/cppcheck.sh

shellcheck:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: false
fetch-depth: 1
- name: Install dependencies
run: |
set -x
sudo apt-get -q update
sudo apt-get --yes install shellcheck
- name: Shellcheck
continue-on-error: true
run: |
set -x
scripts/shellcheck.sh

htmldocs:
Expand Down
7 changes: 7 additions & 0 deletions scripts/cppcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ EXHAUSTIVE=$(cppcheck --check-level=exhaustive --version > /dev/null 2>&1 && ech
CPPCHKOPT=( -j "$nproc" --force "$EXHAUSTIVE" --inline-suppr )
CPPCHKOPT+=( "--enable=warning,performance,portability" )
CPPCHKOPT+=( "-I$(realpath "$(dirname "$0")/../include")" )
CPPCHKOPT+=( --error-exitcode=1 )

if [ -n "$CPPCHECK_OPTS" ]; then
read -r -a OPTS <<< "$CPPCHECK_OPTS"
Expand Down Expand Up @@ -108,4 +109,10 @@ do
docheck "$d" || result=1
done < <(find rtapi/ -type d -not -name "*__pycache__" -print0)

if [ $result -gt 0 ]; then
echo "ERROR: Issues found"
else
echo "No issues found"
fi

exit $result
Loading