# SPDX-FileCopyrightText: 2026 Matvey Shcherbinin # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL # The checks a KDE reviewer runs before reading any code: licensing, the # AppStream and desktop metadata, and the formatting. None of them need Qt, # so they stay fast and independent of the build job. name: lint on: push: pull_request: jobs: reuse: name: reuse lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: fsfe/reuse-action@v5 metadata: name: appstream and desktop entry runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install validators run: | sudo apt-get update sudo apt-get install -y appstream desktop-file-utils # Strict mode is what the Flathub and KDE checks use, so anything it # complains about would have come back as a review comment anyway. The # --no-net keeps the fetch attempt from being the arbiter of whether the # metadata is sound: URL reachability is a deployment concern, and # reachability probes are flaky from CI runners. - name: Validate AppStream metadata run: appstreamcli validate --strict --no-net packaging/*.metainfo.xml - name: Validate desktop entry run: desktop-file-validate packaging/*.desktop clang-format: name: clang-format runs-on: ubuntu-latest # The version is pinned: clang-format-18 is a real package on the runner's # Ubuntu 24.04 (1:18.1.3-1), and 18 is what .kde-ci.yml asks for, so this # is the check KDE will run. Plain `clang-format` on the runner is a # different build and reports differently, which is what made the old # version of this job untrustworthy. # # The tree passes 18: the two reformatting commits are listed in # .git-blame-ignore-revs. This job gates on the check, like the KDE CI's # clang-format-versions entry. steps: - uses: actions/checkout@v4 - name: Install clang-format 18 run: | sudo apt-get update sudo apt-get install -y clang-format-18 - name: Check formatting run: | find src \( -name '*.cpp' -o -name '*.h' \) -print0 \ | xargs -0 clang-format-18 --dry-run --Werror