- Notifications
You must be signed in to change notification settings - Fork 147
Description
The spec says: "Tags and format properties are case sensitive".
The document contains:
FilesAnalyzed: TRUE 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.