Debian Codegraph @

gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdiagnostics-format=sarif-file" } */
3
4 extern char *gets (char *s);
5
6 void test_cwe (void)
7 {
8 char buf[1024];
9 gets (buf);
10 }
11
12 /* Verify that some JSON was written to a file with the expected name. */
13 /* { dg-final { verify-sarif-file } } */
14
15 /* Use a Python script to verify various properties about the generated
16 .sarif file:
17 { dg-final { run-sarif-pytest diagnostic-test-metadata-sarif.c "diagnostic-test-metadata-sarif.py" } } */