Skip to content

OutputHTML: Fix License Reference Table content #4474

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

pepper-jk
Copy link

@pepper-jk pepper-jk commented Jul 14, 2025

Image

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 empty license_references get overridden with the finished list of collected licenses.

Fixes #4101. Please refer to the issue for more information on the bug.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Jens Keim [email protected]

The new template expects a sorted list of license objects,
therefore the `licenses` dictionary gets converted.
None entries get discarded.
Finally the empty `license_references` get overridden with
the finished list of collected licenses.

Fixes aboutcode-org#4101.

Signed-off-by: Jens Keim <[email protected]>
@pepper-jk
Copy link
Author

pepper-jk commented Jul 14, 2025

Everything succeeds except the macOS tests, which I assume fail for unrelated reasons.

I also added myself to Authors and added the fix to the changelog as per the PR template tasks.
But let me know if I should skip the Authors step, since this is such a small contribution.

@pepper-jk pepper-jk marked this pull request as ready for review July 14, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License References table missing from HTML output
1 participant