Conversation
Runs in parallel with lint and tests. Posts a Buildkite annotation with the full diagnostics and fails if the score drops below 95 or if error-level issues are found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ANSI escape codes embedded in the output were preventing the grep pattern from matching the score. Strip them before parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d-react-doctor-ci
| # Run react-doctor and capture output | ||
| # Don't use --offline so score gets calculated | ||
| # Use --fail-on error to catch error-level issues | ||
| OUTPUT=$(npx -y react-doctor --no-ami --yes --fail-on error 2>&1) || DOCTOR_EXIT=$? |
There was a problem hiding this comment.
I think this always runs the latest version, right? I am wondering if we should use specific version instead? The main reason why I am thinking that is if the latest version has some breaking changes, the CI build could potentially break. But it is not a strong opinion, mostly something to consider in my opinion.
There was a problem hiding this comment.
Yes! it uses the latest version. I had a similar concern where the CI fails because new rules are added or the score algorithm is updated, but in that case we could change the threshold if necessary. Running the latest version allows us to benefit from new best practices and bugfixes.
katinthehatsite
left a comment
There was a problem hiding this comment.
the changes look good to me. I am not sure if we need React doctor in CI so I will let others share their opinions. I left one small comment for consideration
📊 Performance Test ResultsComparing d59f6e0 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
There was a problem hiding this comment.
This looks good to me, and I think this is a nice-to-have addition to our CI suite. The checks it runs are valuable on top of eg. eslint rules that are already applied locally. Also, as it's run in parallel with other jobs and usually completes in ~1.5m, I don't think it adds much overhead or potentially becomes a bottleneck on any CI run.
Related issues
Proposed Changes
React DoctorBuildkite CI step that runs in parallel with lint, unit tests, e2e, and metrics.buildkite/commands/run-react-doctor.shthat:npx -y react-doctor --no-ami --yes --fail-on errorto detect React code health issuesshould-skip-job.shapps/studio/react-doctor.config.jsonto exclude Electron entry points from being omitted because they are not dead code, and omits thejsx-a11y/no-autofocusrule.Testing Instructions
Pre-merge Checklist