Skip to content

Commit deb47f6

Browse files
ptrthomasclaude
andcommitted
fix formatting and clippy warnings in doctor.rs
- Split long println! macros to satisfy rustfmt - Remove useless format!() calls (clippy::useless_format) - Add pre-commit checks section to CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a4e8975 commit deb47f6

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

claude.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ This allows projects to override specific resources (e.g., local extensions) whi
3232
- `KARATE_HOME` - Override default `~/.karate` global home location
3333
- `NO_COLOR` - Disable colored output
3434

35+
## Pre-Commit Checks
36+
37+
**Always run before committing:**
38+
39+
```bash
40+
cargo fmt --all
41+
cargo clippy -- -D warnings
42+
```
43+
44+
CI will fail if formatting is incorrect or clippy warnings exist.
45+
3546
## Testing
3647

3748
```bash

src/commands/doctor.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,27 @@ fn print_report(report: &DoctorReport) {
297297
// Config
298298
println!("{}", style("Configuration").bold().underlined());
299299
if report.config.global_exists {
300-
println!(" Global: {} {}", style("✓").green(), report.config.global_path);
300+
println!(
301+
" Global: {} {}",
302+
style("✓").green(),
303+
report.config.global_path
304+
);
301305
} else {
302306
println!(
303307
" Global: {}",
304-
style(format!("(none) create with: karate config --global")).dim()
308+
style("(none) create with: karate config --global").dim()
305309
);
306310
}
307311
if report.config.local_exists {
308-
println!(" Local: {} {}", style("✓").green(), report.config.local_path);
312+
println!(
313+
" Local: {} {}",
314+
style("✓").green(),
315+
report.config.local_path
316+
);
309317
} else {
310318
println!(
311319
" Local: {}",
312-
style(format!("(none) create with: karate config --local")).dim()
320+
style("(none) create with: karate config --local").dim()
313321
);
314322
}
315323
}

0 commit comments

Comments
 (0)