Skip to content

Fixes clangd warnings #488

Fixes clangd warnings

Fixes clangd warnings #488

name: build-linux-clazy
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
workflow_call:
env:
QWT_version: 6.3.0
jobs:
build-linux-clazy:
# This build is only done on one Linux version as it is here only to get the warnings from clazy.
# For other versions see build-linux.yml
strategy:
fail-fast: false
matrix:
# not using ubuntu 22.04 due to false positive bug in clang
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
7z x qwt-${{env.QWT_version}}.zip
cd qwt-${{env.QWT_version}}
/usr/lib/qt6/bin/qmake
make -j4
sudo make install
- run: /usr/lib/qt6/bin/qmake DFTFringe.pro -spec linux-clang QMAKE_CXX="clazy"
- uses: ammaraskar/gcc-problem-matcher@master
# ignore noisy dirs from QT files itself
# all level 1 checks but ignore clazy-no-connect-by-name
# no parallel make with clazy to not mess log
- run: |
export CLAZY_IGNORE_DIRS=".*usr.*|.*bezier.*|.*boost.*|.*SingleApplication.*|.*spdlog.*|.*zernike.*" \
&& export CLAZY_CHECKS="level1,no-connect-by-name,function-args-by-value,function-args-by-ref,incorrect-emit,old-style-connect" \
&& make