Merged
Conversation
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.
Type of change
What does this PR do?
Proactive Flex audit — 4 fixes found and corrected on branch
audit/flex-review:diagnostics.ts—rawPattern()): spaces inside Flex quoted strings"hello world" were treated as pattern/action delimiters, causing falseflex/unreachable-rulefor distinct patterns sharing a common word prefix. Fixed by trackinginQuotedepth.flexParser.ts): a standalone{on its own line (multi-line action syntax) was pushed as a spurious rule entry, causing falseflex/unreachable-rulefor the second and subsequent multi-line-action rules. Fixed by detectingtrimmed === '{'and settingactionDepth = 1.flexParser.ts): all SC-related regex patterns used[A-Z_][A-Z0-9_]*(uppercase only). Lowercase SC names likecommentwere silently ignored, skipping allflex/undefined-sc/flex/unused-scdiagnostics for them.flexParser.ts): the single-tab pattern-action separator (pattern\taction) was not recognised by the old\s{2,}heuristic, so{identifier}tokens in a C action body were falsely counted as abbreviation refs, suppressingflex/unused-abbrev.diagnostics.ts): removed two dead entries inCATCHALL_PATTERNSthat contained a literal newline character and could never match a rule lineRelated issue
Closes # (audit, no issue number)
How to test manually
Open
tests/_test.lin VS Code — no false diagnostics should appear. Verify thatGREET1/GREET2(defined but not used as{abbr}) correctly showflex/unused-abbrev.Checklist
npm run compilepasses with no new errorsnpx ts-node ...)