Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topdown: support glob.match without delimiters (#4933)
Using null for delimiters disables delimiters in glob matching. Preferable over regex on some cases for performance reasons. Fixes #4923. Signed-off-by: vinhph0906 <vinhph0906@gmail.com> Co-authored-by: Stephan Renatus <stephan.renatus@gmail.com>
- Loading branch information
1 parent
c981cc9
commit da4a100
Showing
10 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cases: | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
glob.match("*", null, "foo.bar", x) | ||
} | ||
note: globmatch/glob match single without default delimiter | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- true | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
glob.match("foo*", null, "foo.bar", x) | ||
} | ||
note: globmatch/glob match single without default delimiter, glob non-empty | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- true |
This file contains 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
This file contains 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
This file contains 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
This file contains 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