mirror of
https://github.com/zealdocs/zeal.git
synced 2026-08-29 08:34:50 +08:00
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
clang-format:
|
|
name: Clang Format
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Run clang-format
|
|
uses: cpp-linter/cpp-linter-action@v2
|
|
id: linter
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
version: '22'
|
|
style: file
|
|
tidy-checks: '-*'
|
|
file-annotations: true
|
|
files-changed-only: false
|
|
ignore-format: 'src/contrib'
|
|
|
|
- name: Fail on format issues
|
|
if: steps.linter.outputs.checks-failed > 0
|
|
run: |
|
|
echo "::error::${{ steps.linter.outputs.checks-failed }} formatting issue(s) found"
|
|
exit 1
|
|
|
|
reuse:
|
|
name: REUSE Compliance
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Check REUSE Compliance
|
|
uses: fsfe/reuse-action@v6
|