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
27,326 changes: 27,325 additions & 1 deletion assets/screencast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lychee-bin/src/formatters/stats/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl Display for CompactResponseStats {
write_if_any(stats.unknown, "❓", "Unknown", &BOLD_PINK, f)?;
write_if_any(stats.excludes, "👻", "Excluded", &BOLD_YELLOW, f)?;
write_if_any(stats.timeouts, "⏳", "Timeouts", &BOLD_YELLOW, f)?;
write_if_any(stats.unsupported, "⛔", "Unsupported", &BOLD_YELLOW, f)?;

Ok(())
}
Expand Down
3 changes: 2 additions & 1 deletion lychee-bin/src/formatters/stats/detailed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ impl Display for DetailedResponseStats {
write_stat(f, "\u{1f500} Redirected", stats.redirects, true)?; // 🔀
write_stat(f, "\u{1f47b} Excluded", stats.excludes, true)?; // 👻
write_stat(f, "\u{2753} Unknown", stats.unknown, true)?; //❓
write_stat(f, "\u{1f6ab} Errors", stats.errors, false)?; // 🚫
write_stat(f, "\u{1f6ab} Errors", stats.errors, true)?; // 🚫
write_stat(f, "\u{26d4} Unsupported", stats.errors, false)?; // ⛔

let response_formatter = get_response_formatter(&self.mode);

Expand Down
42 changes: 24 additions & 18 deletions lychee-bin/src/formatters/stats/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ fn stats_table(stats: &ResponseStats) -> String {
status: "\u{1f6ab} Errors",
count: stats.errors,
},
StatsTableEntry {
status: "\u{26d4} Unsupported",
count: stats.unsupported,
},
];
let style = Style::markdown();

Expand Down Expand Up @@ -196,15 +200,16 @@ mod tests {
fn test_render_stats() {
let stats = ResponseStats::default();
let table = stats_table(&stats);
let expected = "| Status | Count |
|---------------|-------|
| 🔍 Total | 0 |
| ✅ Successful | 0 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 0 |
| ❓ Unknown | 0 |
| 🚫 Errors | 0 |";
let expected = "| Status | Count |
|----------------|-------|
| 🔍 Total | 0 |
| ✅ Successful | 0 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 0 |
| ❓ Unknown | 0 |
| 🚫 Errors | 0 |
| ⛔ Unsupported | 0 |";
assert_eq!(table, expected.to_string());
}

Expand All @@ -228,15 +233,16 @@ mod tests {
let summary = MarkdownResponseStats(stats);
let expected = "# Summary

| Status | Count |
|---------------|-------|
| 🔍 Total | 1 |
| ✅ Successful | 0 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 0 |
| ❓ Unknown | 0 |
| 🚫 Errors | 1 |
| Status | Count |
|----------------|-------|
| 🔍 Total | 1 |
| ✅ Successful | 0 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 0 |
| ❓ Unknown | 0 |
| 🚫 Errors | 1 |
| ⛔ Unsupported | 0 |

## Errors per input

Expand Down