-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[issue-650] raise ParsingError if elements don't have an SPDXID
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
- Loading branch information
Showing
8 changed files
with
113 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
tests/spdx/parser/rdf/data/invalid_documents/file_without_spdx_ids.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<rdf:RDF | ||
xmlns:spdx="http://spdx.org/rdf/terms#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:ptr="http://www.w3.org/2009/pointers#" | ||
> | ||
<spdx:SpdxDocument rdf:about="https://some.namespace#SPDXRef-DOCUMENT"> | ||
<rdfs:comment>documentComment</rdfs:comment> | ||
<spdx:name>documentName</spdx:name> | ||
<spdx:dataLicense rdf:resource="http://spdx.org/licenses/CC0-1.0"/> | ||
<spdx:creationInfo> | ||
<spdx:CreationInfo rdf:nodeID="N80af30c2c55b44afb3a7cf4124ed9aff"> | ||
<spdx:licenseListVersion>3.19</spdx:licenseListVersion> | ||
<spdx:created>2022-12-01T00:00:00Z</spdx:created> | ||
</spdx:CreationInfo> | ||
</spdx:creationInfo> | ||
</spdx:SpdxDocument> | ||
<spdx:Package> | ||
<spdx:name>packageName</spdx:name> | ||
<spdx:downloadLocation>http://differentdownload.com</spdx:downloadLocation> | ||
</spdx:Package> | ||
<spdx:File> | ||
<spdx:checksum> | ||
<spdx:Checksum rdf:nodeID="Nab58c45c3b81449e9d4fbcb81940ceee"> | ||
<spdx:algorithm rdf:resource="http://spdx.org/rdf/terms#checksumAlgorithm_sha1"/> | ||
<spdx:checksumValue>71c4025dd9897b364f3ebbb42c484ff43d00791c</spdx:checksumValue> | ||
</spdx:Checksum> | ||
</spdx:checksum> | ||
<spdx:fileName>./fileName.py</spdx:fileName> | ||
</spdx:File> | ||
<spdx:Snippet> | ||
<spdx:range> | ||
<ptr:StartEndPointer rdf:nodeID="N77e7b08564a0412a9413b90ff9b3ddd9"> | ||
<ptr:startPointer> | ||
<ptr:ByteOffsetPointer rdf:nodeID="N89d93c1292de424f9aa75ee1e297ede9"> | ||
<ptr:offset rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</ptr:offset> | ||
<ptr:reference rdf:resource="https://some.namespace#SPDXRef-File"/> | ||
</ptr:ByteOffsetPointer> | ||
</ptr:startPointer> | ||
<ptr:endPointer> | ||
<ptr:ByteOffsetPointer rdf:nodeID="N7099800c04534fcc8a998b551fee34ce"> | ||
<ptr:reference rdf:resource="https://some.namespace#SPDXRef-File"/> | ||
<ptr:offset rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2</ptr:offset> | ||
</ptr:ByteOffsetPointer> | ||
</ptr:endPointer> | ||
</ptr:StartEndPointer> | ||
</spdx:range> | ||
<spdx:snippetFromFile/> | ||
</spdx:Snippet> | ||
</rdf:RDF> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters