-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags and format properties are case sensitive #753
Comments
This is an issue with the tag-value parsing, the corresponding code can be found here. The code currently does not check whether the input is conformant with the spec at all. This should be added. As this is simply a boolean, I don't think we should be as strict as the spec suggests and instead accept |
I think we should be as strict and instead fail with an helpful error if some value can not be parsed to bool. |
I agree with Max. We should follow the standard and be strict. |
Hello @armintaenzertng I confirm #758 fixes the issue. |
The spec says: "Tags and format properties are case sensitive".
The document contains:
pyspdxtools -i hello.spdx
ERROR:root:The document is invalid. The following issues have been found:
package must contain no elements if files_analyzed is False, but found [Relationship(spdx_element_id='SPDXRef-Package-hello', relationship_type=<RelationshipType.CONTAINS: 6>, related_spdx_element_id='SPDXRef-hello-binary', comment=None), Relationship(spdx_element_id='SPDXRef-Package-hello', relationship_type=<RelationshipType.CONTAINS: 6>, related_spdx_element_id='SPDXRef-Makefile', comment=None), Relationship(spdx_element_id='SPDXRef-Package-hello', relationship_type=<RelationshipType.CONTAINS: 6>, related_spdx_element_id='SPDXRef-hello-src', comment=None)]
license_info_from_files must be None if files_analyzed is False, but is: [LicenseSymbol('GPL-3.0-or-later', aliases=('GPL-3.0+', 'LicenseRef-GPL-3.0-or-later'), is_exception=False)]
verification_code must be None if files_analyzed is False, but is: PackageVerificationCode(value='9d20237bb72087e87069f96afb41c6ca2fa2a342', excluded_files=[])
The error message is misleading.
It should say that TRUE is not a correct value for FilesAnalyzed, instead of saying that FilesAnalyzed is False and outputing an error message assuming that FilesAnalyzed is false.
hello.spdx.txt
The text was updated successfully, but these errors were encountered: