From 1734b1b91706a621d2fbd24fa0988fc6912b63a5 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 9 Apr 2021 10:18:08 -0700 Subject: [PATCH] Fixes a regex for language and locale recognition See https://github.com/oasis-tcs/sarif-spec/pull/490 See #418 Note that this changes the sarif spec file. Unless this change is actually merged in the sarif spec repo, the version used by the action will be slightly different. --- src/sarif_v2.1.0_schema.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sarif_v2.1.0_schema.json b/src/sarif_v2.1.0_schema.json index 81f757ccf4..41b12d4af7 100644 --- a/src/sarif_v2.1.0_schema.json +++ b/src/sarif_v2.1.0_schema.json @@ -2339,9 +2339,8 @@ "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": { "description": "Specifies the revision in version control of the artifacts that were scanned.", "type": "array", @@ -3040,7 +3039,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": {