Skip to content
Snippets Groups Projects
Commit f6be8dbe authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[mdr] test libc.c has its sarif document checked for schema conformance

parent b01904b3
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,9 @@
BIN: without-libc.sarif.unfiltered
OPT: -mdr-no-print-libc -mdr-out ./without-libc.sarif.unfiltered
EXECNOW: LOG without-libc.sarif sed -e "s:@PTEST_SESSION@:PTEST_SESSION:" %{dep:without-libc.sarif.unfiltered} > without-libc.sarif 2> @DEV_NULL@
ENABLED_IF: %{bin-available:check-jsonschema}
EXECNOW: LOG with-libc.sarif.checked check-jsonschema --schemafile $(jq '."$schema"' ./with-libc.sarif.unchecked -r) %{dep:with-libc.sarif.unchecked} > ./with-libc.sarif.checked
*/
#include <string.h>
int main() {
......
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [
{
......
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [
{
......
ok -- validation done
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [
{
......@@ -51,9 +51,9 @@
"physicalLocation": {
"artifactLocation": { "uri": "libc.c", "uriBaseId": "PWD" },
"region": {
"startLine": 13,
"startLine": 16,
"startColumn": 10,
"endLine": 13,
"endLine": 16,
"endColumn": 19,
"byteLength": 9
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment