Skip to content

fix: don't drop clang-tidy diagnostics when colors are on - #570

Closed
shenxianpeng wants to merge 1 commit into
mainfrom
claude/project-thread-twjrt1
Closed

shenxianpeng wants to merge 1 commit into
mainfrom
claude/project-thread-twjrt1

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Fixes #560.

If .clang-tidy sets UseColor: true, clang-tidy prints ANSI color codes even when its stdout is piped. No line then matched NOTE_HEADER, so every clang-tidy diagnostic was dropped and the run reported clang-tidy-checks-failed: 0.

As suggested in #560, parse_tidy_output() now strips the color codes from each stdout line before applying the regex. The stripped line is also what gets stored in the notification's suggestion lines.

Tests

If `.clang-tidy` sets `UseColor: true`, clang-tidy prints ANSI color
codes even when piped, so no line matched NOTE_HEADER and every
diagnostic was dropped. Strip the codes from each line before parsing.

Fixes #560
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (d26b5fe) to head (988f6ac).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #570   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files          29       29           
  Lines        7671     7687   +16     
=======================================
+ Hits         7663     7679   +16     
  Misses          8        8           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clang-tidy findings are dropped when .clang-tidy sets UseColor: true

1 participant