INFRA - Fix clippy warnings on pre-existing code (#13) #5
Workflow file for this run
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 | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check | |
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 |