2024-01-31 11:59:46 +08:00
|
|
|
# yamllint disable rule:line-length
|
2024-01-28 07:48:06 +08:00
|
|
|
name: Lint Checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
static_lint_checks:
|
|
|
|
name: Static Lint Checks
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-01-31 11:59:46 +08:00
|
|
|
with:
|
|
|
|
# `git-clang-format` needs access to the commit before the
|
|
|
|
# current merge commit to know what changes to format.
|
|
|
|
fetch-depth: 2
|
2024-01-28 07:48:06 +08:00
|
|
|
- name: Validate GitHub Actions yaml files
|
|
|
|
run: |
|
|
|
|
yamllint ./.github/workflows/ ./.github/actions/
|
2024-01-31 11:59:46 +08:00
|
|
|
- name: Check clang-format
|
|
|
|
run: |
|
|
|
|
wget -q https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/git-clang-format
|
|
|
|
python3 git-clang-format --diff HEAD~1
|