Skip to content

Wrap struct literals in parens before applying rules on them #2331

Wrap struct literals in parens before applying rules on them

Wrap struct literals in parens before applying rules on them #2331

Workflow file for this run

name: Format Check
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup LLVM
uses: ZhongRuoyu/setup-llvm@v0
with:
llvm-version: 23
- name: Setup Python
run: pip install ruff==0.15.22
- name: Configure
run: cmake -GNinja -B build -S .
- name: Format files
run: ninja format
working-directory: build
- name: Check format
run: git diff --exit-code
- name: Check refcount rules have no unsafe code
run: |
if grep -nw unsafe rules/*/tgt_refcount.rs; then
echo "error: refcount rules must not use unsafe code"
exit 1
fi
- name: Check markdown formatting
run: npx prettier@3.9.8 --check "src/**/*.md"
working-directory: docs