Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small question #5

Closed
firmianay opened this issue Aug 5, 2022 · 1 comment
Closed

small question #5

firmianay opened this issue Aug 5, 2022 · 1 comment

Comments

@firmianay
Copy link

Hi, what does the double brackets (( used here mean, I have not found a similar usage description?

    pattern-either:
      # type-based patterns (some types are missing)
      - patterns:
        - pattern: sizeof((char * $PTR))
        - pattern-not: sizeof("...")
      - pattern: sizeof((int * $PTR))
      - pattern: sizeof((float * $PTR))
      - pattern: sizeof((double * $PTR))
@0xdea
Copy link
Owner

0xdea commented Aug 8, 2022

These are typed metavariables. Please refer to Semgrep's official documentation at https://semgrep.dev/docs/writing-rules/pattern-syntax/#typed-metavariables

@0xdea 0xdea closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants