OutputHTML: Fix License Reference Table content #4474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The license references table in the HTML output does not get created with the current version of scancode (32.3.2).
The table was previously (31.2.6) called licenses and was located at the very bottom the static HTML output, see image above.
It summarized all licenses found in the scanned project in one table together with their metadata, such as URL to license text and category.
Evidence suggests that this is broken ever since 32.0.0, specifically PR #3275, where the source of the license references table was changed. This PR basically reverts the changes from 49e7d89, which case the described bug, and adjusts the older code to fit the current HTML template:
The new template expects a sorted list of license objects, therefore the
licenses
dictionary gets converted.None
entries get discarded. Finally the emptylicense_references
get overridden with the finished list of collected licenses.Fixes #4101. Please refer to the issue for more information on the bug.
Tasks
Run tests locally to check for errors.
Signed-off-by: Jens Keim [email protected]