Skip to content

Testing Rules

David Alcantar edited this page May 18, 2023 · 8 revisions

The rule format has built-in self-tests using the must-match and must-not-match fields, which contain strings that the rule is expected to match or expected to not match, respectively. These self-tests are executed when rules are verified using the Verify Command.

Example

"must-match": [
    "gets(string);"
],
"must-not-match": [
    "fgets(string);",
    "gets_s(string);"
]