OASIS Static Analysis Results Interchange Format (SARIF) TC

 View Only
  • 1.  uri/fileIndex consistency

    Posted 01-10-2019 00:26
    This morning we approved the change draft for #298 with the amendment that we add a constraint: the file identified by fileLocation.uri/uriBaseId must be the same as the file identified by fileLocation.fileIndex (which points into the run.files array).   This is surprisingly hard to express elegantly. Here’s what I have, but I’m open to rephrasing it if anyone is in the mood to put on their editor’s hat for a moment:   If both uri and fileIndex are present, they SHALL both denote the same file. That is, let URI 1 be the fully resolved URI of the file specified by a fileLocation object as determined by the uriBaseId resolution procedure described in §3.4.4. Let URI 2 be the fully resolved URI of the file specified by the file object (§3.21) indicated by fileIndex , determined in the same way. Then URI 1 and URI 2 SHALL be equivalent in the sense described in §3.10.1.   (§3.10.1 says that two URIs are “equivalent” if their normalized forms, as described in RFC 3986, are the same.)   Thanks, Larry