Skip to content

fix bug

fix bug #7

Workflow file for this run

name: cpp-linter
permissions:
checks: write
pull-requests: write
repository-projects: write
on:
push:
paths:
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
pull_request:
paths:
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
env:
BUILD_TYPE: Release
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Ninja
uses: ashutoshvarma/[email protected]
with:
version: '1.11.1'
# https://github.com/zhuzichu520/FluentUI/blob/06c9b4e3829af636234a98f946603d68c23f6459/.github/workflows/ubuntu.yml#L49-L50
- name: Install GL library (Ubuntu)
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
modules: 'qt5compat qtwebsockets qthttpserver qtshadertools qtmultimedia'
cache: 'true'
cache-key-prefix: 'install-qt-action'
- name: Configure CMake
run: cmake -G Ninja -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_PREFIX_PATH=${{env.Qt6_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: '16'
style: file
database: ${{github.workspace}}/build
tidy-checks: -modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls
file-annotations: false
step-summary: true
thread-comments: ${{ github.event_name == 'pull_request' }}
lines-changed-only: false
files-changed-only: true