Skip to content

Fix #4225: derive is_manifest flag from packagedcode handlers - #5592

Open
motalib6 wants to merge 2 commits into
aboutcode-org:developfrom
motalib6:fix-4225-is-manifest
Open

motalib6 wants to merge 2 commits into
aboutcode-org:developfrom
motalib6:fix-4225-is-manifest

Conversation

@motalib6

@motalib6 motalib6 commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #4225.

The is_manifest flag in summarycode/classify.py relied on a hardcoded _MANIFEST_ENDS list that is a small, outdated subset of the package manifests ScanCode can detect, so 23 packagedcode-detected manifests (go.mod, go.sum, Cargo.lock, conanfile.py, pubspec.yaml, package-lock.json, yarn.lock, poetry.lock, requirements.txt, composer.lock, ...) were not flagged as manifests by --classify.

This change derives the manifest path patterns dynamically from the path_patterns of all APPLICATION_PACKAGE_DATAFILE_HANDLERS (lazy import to avoid a circular import; results cached). The hardcoded list is kept for manifests with no handler. Patterns matching binary package archives (.whl, .jar, .apk, .deb, .rpm, .zip, ...) are excluded.

Tests: added test_is_manifest_path_matches_packagedcode_manifests plus 22 new manifest fixtures; tests/summarycode/test_classify.py 7/7 pass; full tests/summarycode/ suite 36 passed.

This branch has not been deployed

No deployments
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.

is_manifest flag is not accurately determined

1 participant