Cockatrice/.github/workflows/desktop-lint.yml
tooomm 39614a835f pin used actions
plus some reordering and harmonization across files
2026-11-01 22:18:02 +01:00

44 lines
1.1 KiB
YAML

name: Code Style (C++)
permissions:
contents: read # needed to checkout repo
on:
# Push trigger not needed for linting, we do not allow direct pushes to master
pull_request:
paths:
- '*/**' # matches all files not in root
- '!**.md'
- '!.ci/**'
- '!.github/**'
- '!.tx/**'
- '!doc/**'
- '.ci/lint_cpp.sh'
- '.github/workflows/desktop-lint.yml'
- '.clang-format'
- '.cmake-format.json'
- 'format.sh'
jobs:
format:
name: "Check formatting"
runs-on: ubuntu-slim # https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
steps:
- name: "Checkout"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 20 # should be enough to find merge base
- name: "Install dependencies"
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
clang-format \
cmake-format \
shellcheck
- name: "Check code formatting"
shell: bash
run: ./.ci/lint_cpp.sh