Remove unused functions #268
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static Analysis | |
on: push | |
jobs: | |
clang-tidy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install clang-tidy-16 | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | |
sudo apt-get update | |
sudo apt-get install -y clang-tidy-16 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.5.* | |
- name: Install Boost Test | |
run: vcpkg install boost-test | |
- name: Make build directory | |
run: mkdir build | |
- name: Generate build files | |
working-directory: build | |
env: | |
CXX: g++-13 | |
run: cmake -DPACKAGE_TESTS=OFF .. | |
- name: Build | |
working-directory: build | |
run: cmake --build . --verbose | |
- name: Main application files | |
run: > | |
clang-tidy-16 src/*.cpp -- -std=c++20 | |
-Iinclude -Ilibs -Iextern/sightread/include | |
-I${Qt6_DIR}/include -I${Qt6_DIR}/include/QtCore -I${Qt6_DIR}/include/QtGui | |
- name: GUI frontend files | |
run: > | |
clang-tidy-16 gui/*.cpp -checks=-cppcoreguidelines-owning-memory,-readability-inconsistent-declaration-parameter-name | |
-- -std=c++20 | |
-Iinclude -Ilibs -Iextern/sightread/include | |
-I${Qt6_DIR}/include -I${Qt6_DIR}/include/QtCore -I${Qt6_DIR}/include/QtGui -I${Qt6_DIR}/include/QtWidgets | |
-Ibuild/choptgui_autogen/include | |
- name: Test files | |
run: > | |
clang-tidy-16 tests/*_unittest.cpp | |
-checks=-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-clang-analyzer-*,-readability-function-cognitive-complexity,-readability-magic-numbers | |
-- -Iinclude -Iextern/sightread/include -I${Qt6_DIR}/include -I${Qt6_DIR}/include/QtCore | |
-I ${VCPKG_INSTALLATION_ROOT}/installed/x64-linux/include -std=c++20 | |
clang-format: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install clang-format-16 | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | |
sudo apt-get update | |
sudo apt-get install -y clang-format-16 | |
- name: Format | |
run: | | |
clang-format-16 -i gui/*.hpp gui/*.cpp include/*.hpp src/*.cpp tests/*.cpp tests/*.hpp | |
git diff --color --exit-code |