Repository navigation
fix(ci): recognize escaped regex alternatives in the docs command - #1611
Merged
Merged
Conversation
The regex guard relied on two exact line numbers for sectionMentioning(). Recognize its string array mapped through a local regex escape helper and joined with a literal pipe instead. Remove both exemptions and test the boundaries of the recognized expression.
|
xyos
enabled auto-merge (squash)
November 18, 2026 11:24
VarshithaPamisetty
approved these changes
Nov 18, 2026
xyos
disabled auto-merge
November 18, 2026 12:00
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.
Problem
The failed check on #1610 reported two unguarded regexes and two stale exceptions. Both patterns in
sectionMentioning()still usewords.map(escapeRegExp).join('|'). Edits earlier indocs.tsmoved them from lines 2227/2238 to 2233/2244.Changes
Remove both line-number exceptions. The regex guard now recognizes the expression itself: a
string[]parameter mapped through a locally declared regex escape helper, then joined with a literal|. Other sinks and the stale-entry check are unchanged. No published package changes.Validation
node --test scripts/sink-guards/*.test.mjs: 36 passed on Node 22.docs.tsfrom feat(blocks)!: run app tasks through package scripts instead of cdk-blocks #1610 atfe03ebb: no regex findings or weak escape helpers.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.