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

feat: allow explicitly ignoring the license of a package in config #1243

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Sep 11, 2024

This allows you to configure the scanner to completely ignore the license of a package in a way that is explicit, as oppose to configuring license.overrides to set the package license to an allowed one.

Resolves #1124

@G-Rath G-Rath force-pushed the config/license-ignore branch from 79cc657 to 5d8ae74 Compare September 11, 2024 20:31
Comment on lines 45 to 47
ignore = true # Ignore this package completely, including license scanning
license.ignore = true # Ignore the license of the package, if it is not already completely ignored at the top level
license.override = ["MIT", "0BSD"] # Override the license of the package, if it is not completely ignored at the top level
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: I've purposely kept the documentation here light as I think it'll be easier to document once #1226 is landed

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.82%. Comparing base (f8953ff) to head (4703d2a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1243      +/-   ##
==========================================
- Coverage   67.83%   67.82%   -0.02%     
==========================================
  Files         174      174              
  Lines       16769    16773       +4     
==========================================
+ Hits        11375    11376       +1     
- Misses       4765     4767       +2     
- Partials      629      630       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cuixq
Copy link
Contributor

cuixq commented Sep 12, 2024

@G-Rath I am a bit confused about what this PR does - could you update the description with more details?

@G-Rath
Copy link
Collaborator Author

G-Rath commented Sep 12, 2024

@cuixq I've added a short description, though I think the linked issue gives context too - let me know if there's anything specific you're still confused on that you'd like me to clarify

@G-Rath G-Rath requested a review from cuixq September 12, 2024 03:47
license.override = ["MIT", "0BSD"] # Override the license of the package, if it is not ignored
ignore = true # Ignore this package completely, including license scanning
license.ignore = true # Ignore the license of the package, if it is not already completely ignored at the top level
license.override = ["MIT", "0BSD"] # Override the license of the package, if it is not completely ignored at the top level
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
license.override = ["MIT", "0BSD"] # Override the license of the package, if it is not completely ignored at the top level
license.override = ["MIT", "0BSD"] # Override the license of the package, if it is not completely ignored

I think this should be updated now that ignore takes priority.

@another-rex another-rex merged commit 19e0abe into google:main Sep 13, 2024
13 checks passed
@another-rex another-rex deleted the config/license-ignore branch September 13, 2024 05: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.

Support ignoring a package only from license scanning
4 participants