fix: add --all to cargo fmt in script/test and autoformat codebase

cargo fmt without --all fails with "Failed to find targets" in
workspace repos. This was blocking every story's gates. Also ran
cargo fmt --all to fix all existing formatting issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-04-13 14:07:08 +00:00
parent ed2526ce41
commit 845b85e7a7
128 changed files with 3566 additions and 2395 deletions
+67 -22
View File
@@ -180,7 +180,13 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
let result = open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001).await;
let result = open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await;
assert!(result.is_ok());
let root = state.get_project_root().unwrap();
@@ -201,9 +207,14 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
assert_eq!(
fs::read_to_string(&mcp_path).unwrap(),
@@ -220,15 +231,29 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
let mcp_path = project_dir.join(".mcp.json");
assert!(mcp_path.exists(), "open_project should write .mcp.json for new projects");
assert!(
mcp_path.exists(),
"open_project should write .mcp.json for new projects"
);
let content = fs::read_to_string(&mcp_path).unwrap();
assert!(content.contains("3001"), "mcp.json should reference the server port");
assert!(content.contains("localhost"), "mcp.json should reference localhost");
assert!(
content.contains("3001"),
"mcp.json should reference the server port"
);
assert!(
content.contains("localhost"),
"mcp.json should reference localhost"
);
}
/// Regression test for bug 371: no-arg `huskies` in empty directory skips scaffold.
@@ -242,9 +267,14 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
assert!(
project_dir.join(".huskies/project.toml").exists(),
@@ -316,9 +346,14 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
let projects = get_known_projects(&store).unwrap();
assert_eq!(projects.len(), 1);
@@ -383,9 +418,14 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
// .huskies/ should have been created automatically
assert!(project_dir.join(".huskies").is_dir());
@@ -402,9 +442,14 @@ mod tests {
let store = make_store(&dir);
let state = SessionState::default();
open_project(project_dir.to_string_lossy().to_string(), &state, &store, 3001)
.await
.unwrap();
open_project(
project_dir.to_string_lossy().to_string(),
&state,
&store,
3001,
)
.await
.unwrap();
// Existing .huskies/ content should not be overwritten
assert_eq!(fs::read_to_string(&readme).unwrap(), "custom content");