Commit b291d70
Fix an issues with
The specification for SPDX v2.3 seems to not require that for each
`SpdxPackage` all files which in reality correspond to that package
have to be included as `SpdxFile` in case files have been analyzed,
namely `filesAnalyzed` is set to `true` [1]. This allows the freedom
for the creator of on SPDX document to only selectively include certain
files. For example, a tool may analyze all files of a package for
license texts, but choose to only selectively include certain files
containing license texts as `SpdxFile` entry into the SPDX document,
for example to reduce the size of the SPDX document a bit, or to omit
information which is less relevant in the given context.
This implies, that it should also be valid to not include any files for
a package at all, even though its files have been analyzed. However,
`_verify()` complains if `filesAnalyzed && files.size() == 0` which
seems incorrect. Drop that check to align with the spec.
[1] https://spdx.github.io/spdx-spec/v2.3/package-information/#78-files-analyzed-field
Signed-off-by: Frank Viernau <frank.viernau@gmail.com>SpdxPackage._verify()
1 parent efbb006 commit b291d70
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 611 | + | |
616 | 612 | | |
617 | 613 | | |
618 | 614 | | |
| |||
0 commit comments