0xdea/semgrep-rules

small question

Closed this issue · 1 comments

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 commented

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