mirror of
https://github.com/kucherenko/jscpd.git
synced 2026-09-19 08:11:03 +08:00
5fd9c6967e
- Console tables (project/duplication-by-format/complexity/dead-code) and the "largest:" summary line interpolated file paths and format names raw: the Markdown escaping fix in the previous commit only covered Markdown, not console. A newline in a path or a custom --formats-exts name forged an extra table row with none of the other columns' data. Sanitized at table()'s one choke point and at the "largest:" line. - format_list() (the --health console/ai duplication line) had the same gap for the formats it lists, independent of the console table fix. - --complexity --fail-on-empty returned before the reporter loop ran, so -r json never wrote a report; the clone-detection and dead-code paths write reports first and apply the gate to the exit code afterward. --complexity now does the same. - dead_code::config()'s early Ok(None) for an unsupported --format returned before parsing --dead-code-categories or clamping --min-confidence, so --dashboard --format css --dead-code-categories bogus silently succeeded despite the comment above it saying that must stay a refusal. Moved both checks before the format check. 8 new tests.