You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug metavariable-pattern with pattern-regex doesn't match _, while metavariable-regex with the same regex does.
The former also produces:
Internal matching error when running try-catch-all-bug on target.ml:
An error occurred while invoking the Semgrep engine. Please help us fix this by creating an issue at https://github.com/returntocorp/semgrep
metavariable-pattern failed because $E does not bind to a sub-program, please check your rule Engine(MatchingError)
Describe the bug
metavariable-pattern
withpattern-regex
doesn't match_
, whilemetavariable-regex
with the sameregex
does.The former also produces:
To Reproduce
Doesn't work: https://semgrep.dev/playground/s/L1qv9.
Works: https://semgrep.dev/playground/s/8GNPq.
Expected behavior
_
is matched in both cases, regardless of metavariable matching syntax.What is the priority of the bug to you?
Use case
Write rule for catch-all exception handlers, regardless of whether they use a wildcard or an identifier.
The text was updated successfully, but these errors were encountered: