Skip to content

Updated manifest detection in classify.py to use dynamically detect manifest files from registered handlers #4230

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 1 commit into
base: develop
Choose a base branch
from

Conversation

lkshayb
Copy link

@lkshayb lkshayb commented Apr 8, 2025

Replaced the _MANIFEST_ENDS list in summarycode/classify.py , that was a hardcoded list of extensions with a dynamically generated set of manifest file extensions derived from APPLICATION_PACKAGE_DATAFILE_HANDLERS.

Added get_dynamic_manifestends() function to generate the manifest extensions from the handler path_patterns. Also updated the _MANIFEST_ENDS list so that now it uses the newly added function to get file extensions dynamically.

This change ensures:

  • More accurate and consistent manifest detection.

  • Easier maintenance when new package handlers are being added.

  • Less duplication of extension logic.

Fixes #4225

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 📁

Signed-off-by: Lakshay Bhatia 08Lakshay@gmail.com

…d patterns

Replaced the _MANIFEST_ENDS list in summarycode/classify.py , that was a hardcoded list of extensions with a dynamically generated set of manifest file extensions derived from APPLICATION_PACKAGE_DATAFILE_HANDLERS.

It will ensures that the is_manifest classification flag uses latestt and comprehensive patterns that are being defined across all supported package handlers.
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