From patchwork Mon Sep 9 23:48:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1982868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R5CQPAOa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2k7Z3pmlz1y1l for ; Tue, 10 Sep 2024 09:48:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7AA1F385B529 for ; Mon, 9 Sep 2024 23:48:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 791AB3858D39 for ; Mon, 9 Sep 2024 23:48:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 791AB3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 791AB3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725925710; cv=none; b=gG2mTwp0kNFPzA7iQMjlxIqGPo9uiAewGZke25bhyxyTFagnsUO8Zs+CBwAhAueuXlY0U3WQWFR7oQsIM0dzbPlU69Vp5blHzan7IlNgxM8jnO+dq6DOApwf+YPqLGr6tFXWOd2y1V94AbeU0ccuAsSoQ0MyxAw8ARNJpN89jJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725925710; c=relaxed/simple; bh=2qPSgPBkIH4S0UJswdVY4leL66rvplJHCj5Err5Zeb0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LV9QKbtsTCeKVM9Hcs/KpOgEiWsIYTuky1FK4sz/FfWaxkaAA1vNY91oA+EyCDH1hpo7x77FDh1j61omExI01dHj947zBzLy9wsMEwUZkDN+5gW4a5xYzeijWOt2fc1UX4f6RtTClnmbF1QuMnuShxPl/oKe57PwDmu4ZzG2QmY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725925706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2s7b5Dj2sZybqvkZZ2+RarkDLZgmfndLqnuk/QpIyDs=; b=R5CQPAOayf8I7EtVvWJ/2etaZ4Hy7gMZcqHQyPbnzP4AdoIUe3uW2YeyrHKaJD6xv5rXDo eBBppQYnmbfAQvLR5gXNayRi8htDjvls4MvqtaR02jnWqIqRf64gxEcOCXZg1yX0Z3KJpi qZcc6YbgDoCDf2mcc0jsYi2I/FeS7oI= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-462-1OMa0qm9Ov-eYFnAOJDYHg-1; Mon, 09 Sep 2024 19:48:24 -0400 X-MC-Unique: 1OMa0qm9Ov-eYFnAOJDYHg-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7BE7019560AE for ; Mon, 9 Sep 2024 23:48:23 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.8.230]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0F4C83001D06; Mon, 9 Sep 2024 23:48:21 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [pushed: r15-3553] =?utf-8?q?SARIF_output=3A_fix_schema_URL_=5B?= =?UTF-8?q?=C2=A73.13.3, =20PR116603]?= Date: Mon, 9 Sep 2024 19:48:19 -0400 Message-ID: <20240909234819.586863-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org We were using https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json as the URL for the SARIF 2.1 schema, but this is now a 404. Update it to the URL listed in the spec (ยง3.13.3 "$schema property"), which is: https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json and update the copy in gcc/testsuite/lib/sarif-schema-2.1.0.json used by the "verify-sarif-file" DejaGnu directive to the version found at that latter URL; the sha256 sum changes from: 2b19d2358baef0251d7d24e208d05ffabf1b2a3ab5e1b3a816066fc57fd4a7e8 to: c3b4bb2d6093897483348925aaa73af03b3e3f4bd4ca38cef26dcb4212a2682e Doing so added a validation error on c-c++-common/diagnostic-format-sarif-file-pr111700.c for which we emit this textual output: this-file-does-not-exist.c: warning: #warning message [-Wcpp] with no line number, and these invalid SARIF regions within the physical location of the warning: "region": {"startColumn": 2, "endColumn": 9}, "contextRegion": {} This is due to this directive: # 0 "this-file-does-not-exist.c" with line number 0. The patch fixes this by not creating regions that have startLine <= 0. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-3553-g38dc2c64710aa0. gcc/ChangeLog: PR other/116603 * diagnostic-format-sarif.cc (SARIF_SCHEMA): Update URL. (sarif_builder::maybe_make_region_object): Don't create regions with startLine <= 0. (sarif_builder::maybe_make_region_object_for_context): Likewise. gcc/testsuite/ChangeLog: PR other/116603 * gcc.dg/plugin/diagnostic-test-metadata-sarif.py (test_basics): Update expected schema URL. * gcc.dg/plugin/diagnostic-test-paths-multithreaded-sarif.py: Likewise. * gcc.dg/sarif-output/test-include-chain-1.py: Likewise. * gcc.dg/sarif-output/test-include-chain-2.py: Likewise. * gcc.dg/sarif-output/test-missing-semicolon.py: Likewise. * gcc.dg/sarif-output/test-no-diagnostics.py: Likewise. * gcc.dg/sarif-output/test-werror.py: Likewise. * lib/sarif-schema-2.1.0.json: Update with copy downloaded from https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json Signed-off-by: David Malcolm --- gcc/diagnostic-format-sarif.cc | 25 +++++-- .../plugin/diagnostic-test-metadata-sarif.py | 2 +- ...agnostic-test-paths-multithreaded-sarif.py | 2 +- .../sarif-output/test-include-chain-1.py | 2 +- .../sarif-output/test-include-chain-2.py | 2 +- .../sarif-output/test-missing-semicolon.py | 2 +- .../sarif-output/test-no-diagnostics.py | 2 +- .../gcc.dg/sarif-output/test-werror.py | 2 +- gcc/testsuite/lib/sarif-schema-2.1.0.json | 73 ++++++++++++------- 9 files changed, 72 insertions(+), 40 deletions(-) diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc index 9d9e7ae60734..e95f18f31bda 100644 --- a/gcc/diagnostic-format-sarif.cc +++ b/gcc/diagnostic-format-sarif.cc @@ -2221,7 +2221,10 @@ sarif_builder::get_sarif_column (expanded_location exploc) const or return nullptr. If COLUMN_OVERRIDE is non-zero, then use it as the column number - if LOC has no column information. */ + if LOC has no column information. + + We only support text properties of regions ("text regions"), + not binary properties ("binary regions"); see 3.30.1. */ std::unique_ptr sarif_builder::maybe_make_region_object (location_t loc, @@ -2244,11 +2247,16 @@ sarif_builder::maybe_make_region_object (location_t loc, if (exploc_finish.file !=exploc_caret.file) return nullptr; + /* We can have line == 0 in the presence of "#" lines. + SARIF requires lines > 0, so if we hit this case we don't have a + way of validly representing the region as SARIF; bail out. */ + if (exploc_start.line <= 0) + return nullptr; + auto region_obj = ::make_unique (); /* "startLine" property (SARIF v2.1.0 section 3.30.5) */ - if (exploc_start.line > 0) - region_obj->set_integer ("startLine", exploc_start.line); + region_obj->set_integer ("startLine", exploc_start.line); /* "startColumn" property (SARIF v2.1.0 section 3.30.6). @@ -2316,11 +2324,16 @@ maybe_make_region_object_for_context (location_t loc, if (exploc_finish.file !=exploc_caret.file) return nullptr; + /* We can have line == 0 in the presence of "#" lines. + SARIF requires lines > 0, so if we hit this case we don't have a + way of validly representing the region as SARIF; bail out. */ + if (exploc_start.line <= 0) + return nullptr; + auto region_obj = ::make_unique (); /* "startLine" property (SARIF v2.1.0 section 3.30.5) */ - if (exploc_start.line > 0) - region_obj->set_integer ("startLine", exploc_start.line); + region_obj->set_integer ("startLine", exploc_start.line); /* "endLine" property (SARIF v2.1.0 section 3.30.7) */ if (exploc_finish.line != exploc_start.line @@ -2627,7 +2640,7 @@ sarif_builder::make_multiformat_message_string (const char *msg) const return message_obj; } -#define SARIF_SCHEMA "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" +#define SARIF_SCHEMA "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" #define SARIF_VERSION "2.1.0" /* Make a top-level "sarifLog" object (SARIF v2.1.0 section 3.13). */ diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py index 959e6f2e9942..2c3858786eca 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py @@ -13,7 +13,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-multithreaded-sarif.py b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-multithreaded-sarif.py index cb00faf1532a..43d40cea372b 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-multithreaded-sarif.py +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-multithreaded-sarif.py @@ -45,7 +45,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-1.py b/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-1.py index 4bb2ebf61473..87e7627dcbd6 100644 --- a/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-1.py +++ b/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-1.py @@ -8,7 +8,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-2.py b/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-2.py index 843f89a94853..3671e8d7d8d3 100644 --- a/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-2.py +++ b/gcc/testsuite/gcc.dg/sarif-output/test-include-chain-2.py @@ -26,7 +26,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/sarif-output/test-missing-semicolon.py b/gcc/testsuite/gcc.dg/sarif-output/test-missing-semicolon.py index 17759d35a468..58c0a7d02cd8 100644 --- a/gcc/testsuite/gcc.dg/sarif-output/test-missing-semicolon.py +++ b/gcc/testsuite/gcc.dg/sarif-output/test-missing-semicolon.py @@ -8,7 +8,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/sarif-output/test-no-diagnostics.py b/gcc/testsuite/gcc.dg/sarif-output/test-no-diagnostics.py index f5812df17dc0..a3e052f100a0 100644 --- a/gcc/testsuite/gcc.dg/sarif-output/test-no-diagnostics.py +++ b/gcc/testsuite/gcc.dg/sarif-output/test-no-diagnostics.py @@ -8,7 +8,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/gcc.dg/sarif-output/test-werror.py b/gcc/testsuite/gcc.dg/sarif-output/test-werror.py index 99c2c2c97919..291a26b55880 100644 --- a/gcc/testsuite/gcc.dg/sarif-output/test-werror.py +++ b/gcc/testsuite/gcc.dg/sarif-output/test-werror.py @@ -8,7 +8,7 @@ def sarif(): def test_basics(sarif): schema = sarif['$schema'] - assert schema == "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" + assert schema == "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json" version = sarif['version'] assert version == "2.1.0" diff --git a/gcc/testsuite/lib/sarif-schema-2.1.0.json b/gcc/testsuite/lib/sarif-schema-2.1.0.json index e0b652457104..0f58372b548f 100644 --- a/gcc/testsuite/lib/sarif-schema-2.1.0.json +++ b/gcc/testsuite/lib/sarif-schema-2.1.0.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema", - "$id": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", + "id": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json", "description": "Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema: a standard format for the output of static analysis tools.", "additionalProperties": false, "type": "object", @@ -15,12 +15,13 @@ "version": { "description": "The SARIF format version of this log file.", - "enum": [ "2.1.0" ] + "enum": [ "2.1.0" ], + "type": "string" }, "runs": { "description": "The set of runs contained in this log file.", - "type": "array", + "type": [ "array", "null" ], "minItems": 0, "uniqueItems": false, "items": { @@ -181,7 +182,8 @@ "userSpecifiedConfiguration", "toolSpecifiedConfiguration", "debugOutputFile" - ] + ], + "type": "string" } }, @@ -587,17 +589,18 @@ "version": { "description": "The SARIF format version of this external properties object.", - "enum": [ "2.1.0" ] + "enum": [ "2.1.0" ], + "type": "string" }, "guid": { - "description": "A stable, unique identifer for this external properties object, in the form of a GUID.", + "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "runGuid": { - "description": "A stable, unique identifer for the run associated with this external properties object, in the form of a GUID.", + "description": "A stable, unique identifier for the run associated with this external properties object, in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -778,7 +781,7 @@ }, "guid": { - "description": "A stable, unique identifer for the external property file in the form of a GUID.", + "description": "A stable, unique identifier for the external property file in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -1563,7 +1566,8 @@ "level": { "description": "A value specifying the severity level of the notification.", "default": "warning", - "enum": [ "none", "note", "warning", "error" ] + "enum": [ "none", "note", "warning", "error" ], + "type": "string" }, "threadId": { @@ -1775,7 +1779,13 @@ "description": "Key/value pairs that provide additional information about the region.", "$ref": "#/definitions/propertyBag" } - } + }, + + "anyOf": [ + { "required": [ "startLine" ] }, + { "required": [ "charOffset" ] }, + { "required": [ "byteOffset" ] } + ] }, "replacement": { @@ -1825,7 +1835,7 @@ }, "guid": { - "description": "A unique identifer for the reporting descriptor in the form of a GUID.", + "description": "A unique identifier for the reporting descriptor in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -1924,7 +1934,8 @@ "level": { "description": "Specifies the failure level for the report.", "default": "warning", - "enum": [ "none", "note", "warning", "error" ] + "enum": [ "none", "note", "warning", "error" ], + "type": "string" }, "rank": { @@ -2048,13 +2059,15 @@ "kind": { "description": "A value that categorizes results by evaluation state.", "default": "fail", - "enum": [ "notApplicable", "pass", "fail", "review", "open", "informational" ] + "enum": [ "notApplicable", "pass", "fail", "review", "open", "informational" ], + "type": "string" }, "level": { "description": "A value specifying the severity level of the result.", "default": "warning", - "enum": [ "none", "note", "warning", "error" ] + "enum": [ "none", "note", "warning", "error" ], + "type": "string" }, "message": { @@ -2079,7 +2092,7 @@ }, "guid": { - "description": "A stable, unique identifer for the result in the form of a GUID.", + "description": "A stable, unique identifier for the result in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -2184,7 +2197,8 @@ "unchanged", "updated", "absent" - ] + ], + "type": "string" }, "rank": { @@ -2354,7 +2368,7 @@ "description": "The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646).", "type": "string", "default": "en-US", - "pattern": "^[a-zA-Z]{2}|^[a-zA-Z]{2}-[a-zA-Z]{2}]?$" + "pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2})?$" }, "versionControlProvenance": { @@ -2474,7 +2488,8 @@ "columnKind": { "description": "Specifies the unit in which the tool measures columns.", - "enum": [ "utf16CodeUnits", "unicodeCodePoints" ] + "enum": [ "utf16CodeUnits", "unicodeCodePoints" ], + "type": "string" }, "externalPropertyFileReferences": { @@ -2590,7 +2605,7 @@ }, "guid": { - "description": "A stable, unique identifer for this object's containing run object in the form of a GUID.", + "description": "A stable, unique identifier for this object's containing run object in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -2702,7 +2717,7 @@ "properties": { "guid": { - "description": "A stable, unique identifer for the suprression in the form of a GUID.", + "description": "A stable, unique identifier for the suprression in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -2712,7 +2727,8 @@ "enum": [ "inSource", "external" - ] + ], + "type": "string" }, "status": { @@ -2721,7 +2737,8 @@ "accepted", "underReview", "rejected" - ] + ], + "type": "string" }, "justification": { @@ -2874,7 +2891,8 @@ "importance": { "description": "Specifies the importance of this location in understanding the code flow in which it occurs. The order from most to least important is \"essential\", \"important\", \"unimportant\". Default: \"important\".", "enum": [ "important", "essential", "unimportant" ], - "default": "important" + "default": "important", + "type": "string" }, "webRequest": { @@ -2932,7 +2950,7 @@ "properties": { "guid": { - "description": "A unique identifer for the tool component in the form of a GUID.", + "description": "A unique identifier for the tool component in the form of a GUID.", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, @@ -3060,7 +3078,7 @@ "description": "The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase language code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646).", "type": "string", "default": "en-US", - "pattern": "^[a-zA-Z]{2}|^[a-zA-Z]{2}-[a-zA-Z]{2}]?$" + "pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2})?$" }, "contents": { @@ -3072,7 +3090,8 @@ "enum": [ "localizedData", "nonLocalizedData" - ] + ], + "type": "string" } },