Skip to content

examples: Minor linter fixes #6

examples: Minor linter fixes

examples: Minor linter fixes #6

Workflow file for this run

name: "C++ Lint"
on:
push:
paths-ignore:
- 'README.md'
jobs:
lint:
name: "clang-tidy"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get -y --no-install-recommends install \
cmake='3.22.*' \
gcc-11='11.*' \
clang-tidy='1:14.*' \
libboost-filesystem-dev='1.74.*' \
libboost-python-dev='1.74.*' \
liblua5.4-dev='5.*' \
libfmt-dev='8.*' \
libgmock-dev='1.11.*' \
libgtest-dev='1.11.*'
- name: Generate compile_commands.json
run: |
mkdir -pv build
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# Check all source and header C++ files;
# ignore files in the build directory or in hidden directories
- name: Execute clang-tidy
run: find . \( \( -path './build' -o -path '*/.*' \) -prune \) -o
\( -type f -a \( -iname '*.cpp' -o -iname '*.h' \) \)
-exec echo "Linting '{}'..." \;
-exec clang-tidy -p build --warnings-as-errors='*' {} +