-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): the invisible-character gate never matched anything #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hyperpolymath
wants to merge
2
commits into
main
Choose a base branch
from
fix/empty-linter-pattern-never-matched
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+30
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/alloyiser
Length of output: 292
🏁 Script executed:
Repository: hyperpolymath/alloyiser
Length of output: 4926
🏁 Script executed:
Repository: hyperpolymath/alloyiser
Length of output: 5494
🌐 Web query:
GNU grep -P PCRE2 \x{200b} character code point value in \x{} or \o{} is too large UTF mode documentation💡 Result:
The error "character value in \x{} or \o{} is too large" in GNU grep when using PCRE2 (the -P option) occurs primarily because PCRE2 is not operating in UTF-8 mode [1]. In PCRE2, escape sequences like \x{200b} are valid only when the engine is explicitly set to recognize multi-byte characters [2][3]. By default, PCRE2 may treat the regex as a sequence of single-byte characters, making a code point value like 0x200B (which is far greater than 255) invalid [2][1]. To resolve this issue: 1. Enable UTF-8 Mode: Ensure you are using the -P option along with an indicator that triggers UTF-8 mode. In many environments, adding the u modifier (often within the regex string if supported, e.g., (?u)) or ensuring your locale is set to a UTF-8 encoding (e.g., LC_CTYPE=en_US.UTF-8) is required [4][1]. 2. Correct Syntax: Verify there are no typos in the sequence. For example, using \x{2000-} (with a trailing hyphen) inside a character class is a common mistake that can trigger parsing errors; ensure ranges are properly formed, such as [\x{2000}-\x{200A}] [1]. 3. PCRE2 Interpretation: Be aware that \x{...} is the standard syntax for specifying Unicode code points in PCRE2 [4][2]. If your environment is compiled with specific alternate options (like PCRE2_ALT_BSUX), the handling of these escapes may change, though this is rare in standard GNU grep implementations [2][5][3]. If you continue to see the error, verify that your grep version supports -P and that your system's locale settings are correctly configured for UTF-8 [4]. Testing with a simple pattern like
grep -P '\x{200B}'in a UTF-8 locale is a standard way to confirm the engine is interpreting the escape sequence as a Unicode code point rather than a literal string [4].Citations:
Add a separate leading-BOM check.
The result file depends only on
grep -aPrl "$PATTERNS". The\x{feff}alternative is not a raw-byte check forEF BB BFat byte 0. Add that check and merge its output with/tmp/empty-lint-results.txt.🤖 Prompt for AI Agents