Merged
Conversation
Minor version adding `glob.match`, `glob.quote_meta`, and `regex.globs_match`
built-in implementations.
**New Features**
- Added `glob.match` built-in with full gobwas/glob-compatible pattern matching,
including `*`, `**`, `?`, character classes (`[abc]`, `[a-z]`, `[!x]`),
brace alternatives (`{foo,bar}`), and configurable path delimiters.
- Added `glob.quote_meta` built-in for escaping glob metacharacters.
- Added `regex.globs_match` built-in for testing whether the intersection of
two glob patterns matches a non-empty set of non-empty strings.
**Bug Fixes**
- Fixed `regex.find_all_string_submatch` to advance by one Unicode codepoint
after a zero-length match, preventing infinite loops and matching Go's
`regexp.FindAllStringSubmatch` behavior.
**Build System / Packaging**
- Fixed vcpkg `portfile.cmake` REF to use `v${VERSION}` prefix, matching the
actual git tag format.
- Added `"supports": "!x86"` constraint to vcpkg manifest.
- Bumped vcpkg OpenSSL minimum version from `3.0.0` to `3.0.2`.
**Test Infrastructure**
- Extracted built-in-specific test cases from `regocpp.yaml` into a new
`builtins.yaml` file with a dedicated CTest target (`rego_test_builtins`).
- Added 27 new test cases covering `glob.match`, `glob.quote_meta`, and
`regex.globs_match` (including edge cases and error conditions).
Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
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.
Minor version adding
glob.match,glob.quote_meta, andregex.globs_matchbuilt-in implementations.New Features
glob.matchbuilt-in with full gobwas/glob-compatible pattern matching, including*,**,?, character classes ([abc],[a-z],[!x]), brace alternatives ({foo,bar}), and configurable path delimiters.glob.quote_metabuilt-in for escaping glob metacharacters.regex.globs_matchbuilt-in for testing whether the intersection of two glob patterns matches a non-empty set of non-empty strings.Bug Fixes
regex.find_all_string_submatchto advance by one Unicode codepoint after a zero-length match, preventing infinite loops and matching Go'sregexp.FindAllStringSubmatchbehavior.Build System / Packaging
portfile.cmakeREF to usev${VERSION}prefix, matching the actual git tag format."supports": "!x86"constraint to vcpkg manifest.3.0.0to3.0.2.Test Infrastructure
regocpp.yamlinto a newbuiltins.yamlfile with a dedicated CTest target (rego_test_builtins).glob.match,glob.quote_meta, andregex.globs_match(including edge cases and error conditions).Fixes #210