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

🐛 fix Unlicense detection #4145

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

spencerschrock
Copy link
Contributor

What kind of change does this PR introduce?

bug fix

What is the current behavior?

The code previously had some special logic for handling the Unlicense SPDX identifier and the logic existed in 2 places. While this worked for local file detection, it broke detection for SPDX identifiers provided by the forge.

What is the new behavior (if this is a feature change)?**

This change moves the logic to the single part of the code concerned with figuring out local file SPDX ids, so both work now.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #4144

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

The code previously had some special logic for handling the Unlicense SPDX
identifier. While this worked for local file detection, it broke detection for
SPDX identifiers provided by the forge. This change moves the logic to the part
of the code concerned with local file detection, so both work now.

Signed-off-by: Spencer Schrock <sschrock@google.com>
@spencerschrock spencerschrock requested a review from a team as a code owner June 5, 2024 19:03
@spencerschrock spencerschrock requested review from justaugustus and raghavkaul and removed request for a team June 5, 2024 19:03
@spencerschrock
Copy link
Contributor Author

/scdiff generate License

Copy link

github-actions bot commented Jun 5, 2024

Copy link
Contributor

@raghavkaul raghavkaul left a comment

Choose a reason for hiding this comment

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

LGTM.

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
@spencerschrock spencerschrock enabled auto-merge (squash) June 6, 2024 17:53
@spencerschrock spencerschrock merged commit 9cd1fb8 into ossf:main Jun 6, 2024
36 checks passed
@spencerschrock spencerschrock deleted the fix-unlicense branch June 6, 2024 18:01
mxmehl added a commit to mxmehl/scorecard that referenced this pull request Jun 7, 2024
* fix unlicense detection

The code previously had some special logic for handling the Unlicense SPDX
identifier. While this worked for local file detection, it broke detection for
SPDX identifiers provided by the forge. This change moves the logic to the part
of the code concerned with local file detection, so both work now.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* remove part of comment which is no longer relevant

Signed-off-by: Spencer Schrock <sschrock@google.com>

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
balteravishay pushed a commit to balteravishay/scorecard that referenced this pull request Jun 12, 2024
* fix unlicense detection

The code previously had some special logic for handling the Unlicense SPDX
identifier. While this worked for local file detection, it broke detection for
SPDX identifiers provided by the forge. This change moves the logic to the part
of the code concerned with local file detection, so both work now.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* remove part of comment which is no longer relevant

Signed-off-by: Spencer Schrock <sschrock@google.com>

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: balteraivshay <avishay.balter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unlicense not accepted as FSF or OSI approved
2 participants