Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ Thanks for your interest in contributing.

## Local Validation

The CI runs three mandatory checks. Run **all of them locally** before pushing:
The CI runs four mandatory checks. Run **all of them locally** before pushing or opening a PR:

```bash
cargo fmt --check # style: must pass without diff
cargo clippy -- -D warnings # lints: zero warnings allowed
cargo test # tests: all must pass
./ci-check.sh
```

This executes:

- `cargo fmt --all -- --check` — style: must pass without diff
- `cargo clippy --all-targets --all-features -- -D warnings` — lints: zero warnings allowed
- `cargo test --all-targets --all-features` — tests: all must pass
- `cargo audit` — dependency vulnerability scan

To auto-fix formatting issues:

```bash
Expand Down
16 changes: 10 additions & 6 deletions ci-check.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

echo "=== cargo fmt --check ==="
cargo fmt --check
echo "=== cargo fmt --all -- --check ==="
cargo fmt --all -- --check

echo ""
echo "=== cargo clippy -- -D warnings ==="
cargo clippy -- -D warnings
echo "=== cargo clippy --all-targets --all-features -- -D warnings ==="
cargo clippy --all-targets --all-features -- -D warnings

echo ""
echo "=== cargo test ==="
cargo test
echo "=== cargo test --all-targets --all-features ==="
cargo test --all-targets --all-features

echo ""
echo "=== cargo audit ==="
cargo audit --ignore RUSTSEC-2023-0071

echo ""
echo "All CI checks passed."
2 changes: 1 addition & 1 deletion src/app/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ mod tests {
let embedded = EMBEDDED_THEMES.iter().find(|(n, _)| *n == "Berlin");
assert!(embedded.is_some(), "Berlin not in EMBEDDED_THEMES");
if let Some((_, content)) = embedded {
assert!(content.len() > 0, "Berlin embed content is empty");
assert!(!content.is_empty(), "Berlin embed content is empty");
eprintln!("Berlin embed content: {content}");
}
// Verify load_theme_by_name returns Berlin
Expand Down
Loading