ci(lint): add ASCII character check using ripgrep#814
Draft
raballew wants to merge 10 commits into
Draft
Conversation
Adds a lint job that flags non-ASCII characters (em-dashes, en-dashes, curly quotes, emoji, etc.) which render poorly in terminals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rg was not installed on ubuntu-latest runners, and the if-guard silently swallowed the command-not-found error. Capture the exit code explicitly: 0 means matches found (fail), 1 means clean (pass), anything else (including 127 command-not-found) propagates as a failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitHub Actions defaults to bash -e which kills the script before
capturing the exit code. Use bash {0} (no -e) so rg prints its
findings before the step fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace em-dashes, en-dashes, arrows, curly quotes, emoji, box-drawing characters, and other non-ASCII content with terminal-safe ASCII across 60 files. Also exclude vendored .min.js from the ascii-check CI job. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Also remove the *.html exclusion from the ascii-check CI glob since all HTML files are now clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace prompt symbols and strip replacement characters from device serial output. Remove the *.cast exclusion from the CI glob. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ascii-checkjob to the lint workflow that usesrg '[^\p{ASCII}]'to flag non-ASCII characters (em-dashes, en-dashes, curly quotes, emoji, etc.) that render poorly or break in terminals.castand.htmlfiles which legitimately contain non-ASCII contentTest plan
ascii-checkjob runs in CI (it will fail on existing violations -- expected)🤖 Generated with Claude Code