Skip to content

Fix all errors from old code #4

Fix all errors from old code

Fix all errors from old code #4

Workflow file for this run

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