CI: Add 'cargo fmt --check' and setup rust toolchain to lint-ci

This commit is contained in:
xnacly 2026-02-24 12:09:24 +01:00 committed by Andreas Kling
parent e897b77e83
commit f3da3c03e8
2 changed files with 10 additions and 0 deletions

View file

@ -30,5 +30,8 @@ jobs:
shell: bash
run: npm install -g prettier@3.8.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Lint
run: ${{ github.workspace }}/Meta/lint-ci.sh

View file

@ -52,4 +52,11 @@ else
((FAILURES+=1))
fi
if cargo fmt --check && git diff --exit-code -- ':*.rs'; then
echo -e "[${GREEN}OK${NC}]: cargo fmt --check"
else
echo -e "[${BOLD_RED}FAIL${NC}]: cargo fmt --check"
((FAILURES+=1))
fi
exit "${FAILURES}"