Skip to content

Fix #4225: Dynamically generate manifest extensions from package handlers#4857

Open
HasTheDev wants to merge 2 commits intoaboutcode-org:developfrom
HasTheDev:fix-manifest-classification
Open

Fix #4225: Dynamically generate manifest extensions from package handlers#4857
HasTheDev wants to merge 2 commits intoaboutcode-org:developfrom
HasTheDev:fix-manifest-classification

Conversation

@HasTheDev
Copy link

Fixes #4225

Replaces the hardcoded _MANIFEST_ENDS list in src/summarycode/classify.py with a dynamically generated set of manifest file extensions from APPLICATION_PACKAGE_DATAFILE_HANDLERS.

Key Updates:

  • Created get_dynamic_manifest_ends() to safely extract path_patterns from registered package handlers.

  • Placed the import of APPLICATION_PACKAGE_DATAFILE_HANDLERS locally inside the function and moved the assignment to the bottom of the file to prevent the circular import issue.

  • Added a fallback to seed the dynamic set with the legacy hardcoded list to ensure 100% backwards compatibility with outdated test suite files (like elm-package.json, project.clj, and metadata).

  • All test_classify.py tests passing locally.

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: HasTheDev 122232470+HasTheDev@users.noreply.github.com

Signed-off-by: HasTheDev <hassanazam2021@gmail.com>
@HasTheDev HasTheDev force-pushed the fix-manifest-classification branch 3 times, most recently from 3c8e1a2 to 7a79419 Compare March 22, 2026 09:08
…age handlers

Signed-off-by: HasTheDev <122232470+HasTheDev@users.noreply.github.com>
@HasTheDev HasTheDev force-pushed the fix-manifest-classification branch from 7a79419 to 5b358b7 Compare March 22, 2026 10:41
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