diff --git a/.gitea/workflows/lint-rust.yml b/.gitea/workflows/lint-rust.yml index 1f81769..54e3301 100644 --- a/.gitea/workflows/lint-rust.yml +++ b/.gitea/workflows/lint-rust.yml @@ -16,12 +16,19 @@ jobs: run: | apk add --no-cache \ git \ - rust + cargo \ + rust \ + rust-clippy - - name: Rustfmt + - name: Clippy run: | - if [ -f Cargo.toml ]; then - cargo fmt --check + if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then + find . -name "Cargo.toml" -print0 | while IFS= read -r -d '' manifest; do + cargo clippy --manifest-path "$manifest" -- -D warnings + done + elif [ -n "$(find . -name "*.rs" -print -quit)" ]; then + echo "Rust files found but no Cargo.toml" + exit 1 else echo "No Rust project found" fi diff --git a/.prettierrc.json b/.prettierrc.json index 19ffb91..b078298 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,9 +1,9 @@ { "semi": true, - "singleQuote": true, + "singleQuote": false, "jsxSingleQuote": false, "tabWidth": 4, - "printWidth": 100, + "printWidth": 80, "trailingComma": "es5", "bracketSpacing": true, "bracketSameLine": false,