Skip to content

Commit 4919985

Browse files
committed
chore: add pre-push hook and fix formatting
- Add scripts/ci/pre-push.sh that runs `just check` before push - Fix rustfmt formatting in unify.rs from PR #5
1 parent 594c849 commit 4919985

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/ci/pre-push.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# Pre-push hook: runs quality checks before allowing push
3+
# Symlink this to .git/hooks/pre-push or run: ln -sf ../../scripts/ci/pre-push.sh .git/hooks/pre-push
4+
5+
set -e
6+
7+
echo "Running pre-push checks..."
8+
just check
9+
10+
echo "All checks passed."

src/commands/unify.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,7 @@ pub fn run_unify_apply(
315315
created_backup_id = Some(backup_id);
316316
}
317317

318-
let sort_mode = ctx
319-
.config
320-
.as_ref()
321-
.map(|c| c.unify.sort_dependencies)
322-
.unwrap_or(true);
318+
let sort_mode = ctx.config.as_ref().map(|c| c.unify.sort_dependencies).unwrap_or(true);
323319
let writer = ManifestWriter::new().with_dependency_sort(sort_mode);
324320

325321
if !plan.workspace_deps.is_empty() {

0 commit comments

Comments
 (0)