From a3504cfcfbcb896d15359777fa565842f9520074 Mon Sep 17 00:00:00 2001 From: Alexander Koeppe Date: Thu, 23 Jan 2025 20:59:11 +0100 Subject: [PATCH 1/2] use packaged cmake-lint version for codeql workflow --- .github/workflows/codeql.yml | 12 +++++++----- misc/cmakelint.sh | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8bf1d6aed..923442351 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -36,12 +36,14 @@ jobs: run: | sudo apt-get update sudo apt-get install -y bison check cmake debhelper flex groff libbsd-dev libcurl4-openssl-dev libmaxminddb-dev libgtk-3-dev libgtk2.0-dev libidn11-dev libltdl-dev libluajit-5.1-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev librtmp-dev libssl-dev - - run: | - git clone https://github.com/richq/cmake-lint.git - cd cmake-lint - python setup.py install --user - cd - + + - name: CMake formatting check + run: | + pip install cmakelint ./misc/cmakelint.sh + + - name: Building software + run: | mkdir build cd build cmake -DENABLE_TESTS=Off $BUILD_ARGS .. diff --git a/misc/cmakelint.sh b/misc/cmakelint.sh index ca172f905..430ca14cc 100755 --- a/misc/cmakelint.sh +++ b/misc/cmakelint.sh @@ -48,10 +48,11 @@ FILTERS=\ +whitespace/newline,\ +whitespace/tabs +echo Running CMake Lint against CMake files CMAKELINT="cmakelint --filter=$FILTERS --quiet --spaces=2" FIND="$(find $ECROOT \ -name CMakeLists.txt -not -path "$ECROOT/build*/*" -or \ -name *.cmake -not -path "$ECROOT/build*/*")" -$CMAKELINT $FIND \ No newline at end of file +$CMAKELINT $FIND From 131255cec9e20c208a9f29fc6a70910e7e417421 Mon Sep 17 00:00:00 2001 From: Alexander Koeppe Date: Sun, 2 Feb 2025 21:08:05 +0100 Subject: [PATCH 2/2] changeto CodeQL version 3 workflow --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 923442351..fe9a96476 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} @@ -53,6 +53,6 @@ jobs: BUILD_ARGS: '' - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}"