hopefully fixed clippy #292
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linter | |
on: push | |
jobs: | |
rust-clippy: | |
name: Run clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
rust-fmt: | |
name: Run rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cargo fmt --all -- --check | |
rust-fmt-boards: | |
name: Run rustfmt (boards) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
board: | |
- stm32l476rg | |
- stm32h743zi | |
- stm32f767zi | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cargo fmt --manifest-path boards/${{ matrix.board }}/Cargo.toml -- --check | |
typos: | |
name: Spell check with typos | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run typos | |
uses: crate-ci/typos@master | |
find-todos-fixme: | |
name: Find todos and fixmes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run todo check | |
run: | | |
if grep -riE -n 'TODO|FIXME' * | grep -v -i 'TODOLater'; then | |
exit 1 | |
else | |
echo "All good" | |
fi | |
check-no-crlf: | |
name: Check no crlf line endings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run check for CRLF line endings | |
run: | | |
if git ls-files --eol | grep crlf; then | |
echo "[ERROR] found CRLF line endings, install dos2unix and run 'find . -type f -exec dos2unix {} \;' to fix" | |
exit 1 | |
fi |