Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Add RUSTFLAGS to pre-merge insta check and remove mut from test repos

Maximilian Roos5d6f5a3e5496
diff --git a/.config/wt.toml b/.config/wt.toml
index 9f15ad393..2a60d3928 100644
--- a/.config/wt.toml
+++ b/.config/wt.toml
@@ -41,5 +41,5 @@ pre-commit = "pre-commit run --all-files"
# Note: This must come AFTER post-merge because [pre-merge] starts
# a TOML table section, and everything after it would be inside that section
[pre-merge]
-insta = "NEXTEST_STATUS_LEVEL=fail NEXTEST_SUCCESS_OUTPUT=never cargo insta test --dnd --check --features shell-integration-tests"
+insta = "RUSTFLAGS='-D warnings' NEXTEST_STATUS_LEVEL=fail NEXTEST_SUCCESS_OUTPUT=never cargo insta test --dnd --check --features shell-integration-tests"
doc = "RUSTDOCFLAGS='-Dwarnings' cargo doc --no-deps"
diff --git a/tests/integration_tests/e2e_shell.rs b/tests/integration_tests/e2e_shell.rs
index d094ff8d1..17fc3bc65 100644
--- a/tests/integration_tests/e2e_shell.rs
+++ b/tests/integration_tests/e2e_shell.rs
@@ -26,7 +26,7 @@ macro_rules! skip_if_shell_unavailable {
#[case("zsh")]
fn test_shell_integration_switch_and_remove(#[case] shell: &str) {
skip_if_shell_unavailable!(shell);
- let mut repo = TestRepo::new();
+ let repo = TestRepo::new();
repo.commit("Initial commit");
let init_code = generate_init_code(&repo, shell);
diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rs
index 734e1666d..808023fe8 100644
--- a/tests/integration_tests/shell_wrapper.rs
+++ b/tests/integration_tests/shell_wrapper.rs
@@ -1324,7 +1324,7 @@ approved-commands = ["echo 'test command executed'"]
#[test]
fn test_readme_example_simple_switch() {
- let mut repo = TestRepo::new();
+ let repo = TestRepo::new();
repo.commit("Initial commit");
// Create worktree through shell wrapper (suppresses hint)
@@ -1340,7 +1340,7 @@ approved-commands = ["echo 'test command executed'"]
#[test]
fn test_readme_example_switch_back() {
- let mut repo = TestRepo::new();
+ let repo = TestRepo::new();
repo.commit("Initial commit");
// Create worktrees (fix-auth is where we are after step 2, feature-api exists from earlier)
@@ -1363,7 +1363,7 @@ approved-commands = ["echo 'test command executed'"]
#[test]
fn test_readme_example_remove() {
- let mut repo = TestRepo::new();
+ let repo = TestRepo::new();
repo.commit("Initial commit");
// Create worktrees
@@ -2463,7 +2463,7 @@ command = "{}"
/// Source: tests/snapshots/shell_wrapper__tests__readme_example_hooks_post_create.snap
#[test]
fn test_readme_example_hooks_post_create() {
- let mut repo = TestRepo::new();
+ let repo = TestRepo::new();
repo.commit("Initial commit");
// Create project config with post-create and post-start hooks