feat: add pipe mode and composable --strip/--halt action flags#13
Merged
feat: add pipe mode and composable --strip/--halt action flags#13
Conversation
Pipe mode (`check-unicode -`) reads stdin line-by-line and writes to stdout, enabling use as a streaming Unix filter for log monitoring, CI pipelines, and editor buffer filtering. Findings are emitted to stderr per-line with full context display (rendered source line, caret markers, codepoint details). New composable action flags work identically across file and pipe modes: - `--strip [dangerous|all]` removes non-ASCII characters from output. Default: all. Respects allow-lists. - `--halt [dangerous|all]` stops immediately on first matching character. Default: dangerous. - `--fix`, `--strip`, and `--halt` are fully composable. Processing order: allow-list -> fix -> halt -> strip. Examples: check-unicode - < file.txt check-unicode --fix --strip dangerous - check-unicode --halt - < input.txt cat logs | check-unicode --fix --strip dangerous -
13c0767 to
d044dc1
Compare
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
check-unicode -): reads stdin line-by-line and writes to stdout, enabling use as a streaming Unix filter for log monitoring, CI pipelines, and editor buffer filtering--strip [dangerous|all]: removes non-ASCII characters from output;dangerousstrips only invisible/bidi chars,all(default) strips any remaining non-ASCII after allow-list processing--halt [dangerous|all]: stops immediately on first matching character;dangerous(default) halts on invisible/bidi chars,allhalts on any non-ASCII--fix,--strip,--halt) are fully composable and work identically across file and pipe modesExamples
Design
Processing order per character: allow-list → fix → halt → strip
--haltstops mid-file/mid-stream — the triggering file is never modifieddocs/specs/2026-03-29-pipe-mode-and-action-flags-design.mdTest plan
--quiet,--no-color--fix,--strip,--haltcombinations)