镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Dynamically load manifest patterns from packagedcode handlers - #5361

Open
Gracy769 wants to merge 3 commits into
aboutcode-org:developfrom
Gracy769:fix-4225-manifest-classification
Open

Gracy769 wants to merge 3 commits into
aboutcode-org:developfrom
Gracy769:fix-4225-manifest-classification

Conversation

@Gracy769

@Gracy769 Gracy769 commented Oct 14, 2026 •

Copy link
Copy Markdown

Summary

Fixes #4225.

--classify missed supported package manifests and lockfiles because its manifest list was static. The package handlers already declare filename patterns, so classification now reuses those patterns.

Changes

  • Load and cache path patterns from active packagedcode datafile handlers.
  • Match both simple suffixes and patterns with embedded wildcards (for example, *conda*.yaml).
  • Exclude package archives and binary handlers from manifest classification.
  • Handle manifests at the scan root and in nested directories.
  • Add focused tests for supported manifests, glob patterns, and archive exclusions; add my entry to AUTHORS.

Verification

  • Isolated classifier checks passed against 135 package-handler declarations extracted from the checkout: 124 suffixes and 19 globs.
  • Python compilation and git diff --check passed.
  • Full local test setup was blocked by a PyPI download timeout; the repository CI is running on this update.

Signed-off-by: Gracy769 169199616+Gracy769@users.noreply.github.com

Update manifest classification in summarycode.classify to dynamically
load path patterns from all active APPLICATION_PACKAGE_DATAFILE_HANDLERS
in packagedcode.

This resolves issue aboutcode-org#4225 where modern package manifests and lockfiles
(such as Cargo.lock, poetry.lock, Pipfile.lock, package-lock.json,
pnpm-lock.yaml, yarn.lock, go.mod, pubspec.yaml, conanfile.py, uv.lock)
failed to be classified with is_manifest=True when running --classify.

Also add unit tests in tests/summarycode/test_classify.py covering
modern manifests and verifying binary archives are excluded.

Fixes aboutcode-org#4225

Signed-off-by: Gracy769 <169199616+Gracy769@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Gracy769

Copy link
Copy Markdown
Author

Note for reviewers: The single CI failure in core_tests license_validate_ignorables_2 is a pre-existing upstream regression on develop (present in Azure Build 19540) caused by missing ignorable_urls in sl-1.1_1.RULE and sl-1.1_2.RULE.

All 31 other platform CI jobs (macOS, Ubuntu, Windows 2019/2022/2025, and all summarycode tests) passed 100%. I have submitted the standalone fix to unbreak develop in #5362.

Signed-off-by: Gracy769 <169199616+Gracy769@users.noreply.github.com>
Signed-off-by: Gracy769 <169199616+Gracy769@users.noreply.github.com>

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

2 participants