/
niceSOFT
/
bdwgc
Обзор
Документация
Войти
/
niceSOFT
/
bdwgc
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/cppcheck.yml
91 строка
3 KB
Ivan Maidanski
Reformat .yml files with yamllint 1.37.1
23 июл 2026, 18:55
23 июл 2026, 18:55
4f039fd
Код
Авторство
О чём код?
--- # This workflow is to check C/C++ source with cppcheck. name: cppcheck "on": [push, pull_request] jobs: check: name: ${{ matrix.name }} runs-on: ubuntu-22.04 strategy: # Deliver the feedback for all matrix combinations. fail-fast: false matrix: include: - name: Check unused (basic) args: >- --enable=unusedFunction --max-configs=200 --suppress=unusedFunction:libatomic_ops --suppress=unusedFunction:tests/gctest.c -D TEST_COVERAGE extra/gc.c tests/*.c - name: Check unused (cord and tests) args: >- --enable=unusedFunction --force --suppress=unusedFunction:cord/tests/de_win.c --suppress=unusedFunction:tests/gctest.c --suppress=unusedFunction:tests/cpp.cc -D GC_BUILTIN_ATOMIC -D TEST_COVERAGE *.cc cord/*.c cord/tests/*.c tests/*.c tests/*.cc - name: All checks (A-M) args: >- -j4 --enable=all --disable=missingInclude,unusedFunction --force -U GC_PRIVATE_H a*.c b*.c c*.c d*.c f*.c g*.c h*.c m*.c - name: All checks (N-W and cord) args: >- -j4 --enable=all --disable=missingInclude,unusedFunction --force -U GC_PRIVATE_H n*.c o*.c p*.c r*.c s*.c t*.c w*.c cord/*.c - name: All checks (other) args: >- -j4 --enable=all --disable=missingInclude,unusedFunction --force --suppress=functionStatic:include/gc/gc_allocator.h *.cc cord/tests/*.c extra/m*.c extra/*.cpp tests/*.c tests/*.cc tools/*.c steps: - uses: actions/checkout@v6 - name: Set cppcheck version id: version run: | CPPCHECK_VER=2.20.1 echo "version=$CPPCHECK_VER" >> $GITHUB_OUTPUT echo "cache_key=cppcheck-$CPPCHECK_VER" >> $GITHUB_OUTPUT - name: Cache cppcheck id: cache-cppcheck uses: actions/cache@v5 with: path: ~/cppcheck-install key: >- ${{ steps.version.outputs.cache_key }}-${{ runner.os }} -${{ runner.arch }} - name: Download and make cppcheck if: steps.cache-cppcheck.outputs.cache-hit != 'true' run: | git clone --depth=1 \ https://github.com/cppcheck-opensource/cppcheck.git ~/cppcheck \ -b ${{ steps.version.outputs.version }} make --directory ~/cppcheck -j8 CXX=clang++ \ CXXFLAGS="-O3 -march=native -D NDEBUG" \ FILESDIR=~/cppcheck-install PREFIX=~/cppcheck-install install - name: Checkout libatomic_ops repository uses: actions/checkout@v6 with: repository: bdwgc/libatomic_ops path: libatomic_ops - name: Run cppcheck analysis run: >- ~/cppcheck-install/bin/cppcheck --error-exitcode=2 --quiet -D CPPCHECK -I include -I libatomic_ops/src --check-level=exhaustive --safety ${{ matrix.args }}