fix: correct scanner violation positions and suppress stderr in JSON mode#189
Closed
rhuanbarreto wants to merge 6 commits intomainfrom
Closed
fix: correct scanner violation positions and suppress stderr in JSON mode#189rhuanbarreto wants to merge 6 commits intomainfrom
rhuanbarreto wants to merge 6 commits intomainfrom
Conversation
…mode - Remove logError in loader that printed scanner violations to stderr unconditionally — violations now flow only through the result pipeline - Fix wrong line/column in scanner violations: Bun.Transpiler strips comments and types which shifted AST positions. Added string-search remapping that finds violations in the original source by occurrence - Skip matches in comments and string literals when remapping positions so patterns like "// Don't use Bun.spawn" don't confuse the mapping - Fix stdin hang in check command when spawned by editors or in pipes by racing Bun.stdin.text() against a 100ms timeout - Suppress git credential prompts in test preload via GIT_TERMINAL_PROMPT, GCM_INTERACTIVE, and GIT_ASKPASS environment variables - Add 39 new tests for position remapping and adversarial edge cases 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>
The CLI repo IS archgate — having it as a proto plugin creates a circular dependency where CI tries to install archgate to build archgate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying archgate-cli with
|
| Latest commit: |
ca3847e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e262cc01.archgate-cli.pages.dev |
| Branch Preview URL: | https://fix-scanner-positions.archgate-cli.pages.dev |
Contributor
Author
|
Closing — the core fix was already merged to main via #155. This branch is stale and behind main. |
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
Bun.Transpilerstrips comments, type annotations, and trailing commas, which shifted AST node positions in the transpiled output. Replacednode.locwith string-search remapping (source-positions.ts) that finds violations in the original TypeScript source by occurrence, skipping matches inside comments and string literals.logError()in loader that printed scanner violations to stderr unconditionally — violations now flow only through the result pipeline.check.tsnow racesBun.stdin.text()against a 100ms timeout so the CLI doesn't block when spawned by editors or in pipe chains with no stdin..prototools.Test plan
🤖 Generated with Claude Code