Skip to content
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

Do not fail without packages in cyclonedx #2987 #3005

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Conversation

AyanSinhaMahapatra
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra commented Jun 21, 2022

Avoids crashing when generating a cyclonedx sbom from scancode-toolkit
when there aren't any package options specified. Also show a warning
message in the CLI and add a warning in the BOM metadata.

Reference: #2987
Signed-off-by: Ayan Sinha Mahapatra ayansmahapatra@gmail.com

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 📁

Copy link
Contributor

@JonoYang JonoYang left a comment

Choose a reason for hiding this comment

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

@AyanSinhaMahapatra Looks good! You'll also need to update the expected test result for the test test_CycloneDxMetadata_from_headers

src/formattedcode/output_cyclonedx.py Outdated Show resolved Hide resolved
Avoids crashing when generating a cyclonedx sbom from scancode-toolkit
when there aren't any package options specified. Also show a warning
message in the CLI and add a warning in the BOM metadata.

Reference: #2987
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@AyanSinhaMahapatra
Copy link
Member Author

@JonoYang made the changes, tests all green now.

@JonoYang
Copy link
Contributor

@AyanSinhaMahapatra Great, merging!

@JonoYang JonoYang merged commit a61fe17 into develop Jun 27, 2022
@JonoYang JonoYang deleted the 2987-cyclonedx branch June 27, 2022 19:28
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.

None yet

2 participants