-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
No way to obtain LicenseMatch origin #3608
Comments
@srehm Thanks for reporting! This is a bug indeed.
Yeah, that's the case here actually. 😅
Yeah in this we could not find the referenced NOTICE file as it was not in the scanned codebase, so we could not add licenses from there. From the file you referenced see line 2:
Since there is a reference in this file to the NOTICE file we were getting the license detections from the NOTICE file and adding it back here. But as you've rightly pointed out this is a bit weird and originally we only wanted to do this when it was an unknown reference, but here this is a proper license notice present so we would be doing things a bit differently. |
Thanks for the explanation. I think I get the point. In my case the swig.m4 references the NOTICE file and that in turn references the LICENSE file. That explains the additional licenses that apply to the file. |
@srehm as @AyanSinhaMahapatra pointed, the resolution may be described in #3547 You wrote:
You picked my curiosity. Tell me more! That said, there are really two issues:
|
@pombredanne wrt.
Yes! We've discussed this too (to make sure we can distinguish the matches which come from other files in SCIO) and this is somewhere in a branch as I had started working on this. To summarise what we discussed (was to be discussed/reviewed) further to make sure this design is correct: To pinpoint which file a match is coming from we were going to add a ln attribute somewhat like
We point to paths and not LicenseDetection id because we carry over all the matches in a file in the following reference case, so this would be enough. |
These rules improve the accuracy of the license detection in Subversion Reference: #3608 Reported-by: Stefan Rehm @srehm Signed-off-by: Philippe Ombredanne <[email protected]>
As the |
Yes, this can be closed, thanks! |
Description
I was scanning the subversion package from Debian Bullseye (1.14.1-3+deb11u1) with scancode 32.0.8. After the scan completed, I noticed bogus license detections in at least one file: build/ac-macros/swig.m4
Not only are there 51 (if I counted correctly :)) matches from which only the first one is correct. There are also matches in line ranges that don`t even exist in the file (e.g. the file has 360 lines and there are detections on lines 400+).
What makes this even stranger is the fact that in my tests I could not reproduce the error by scanning that file separately. It only happens if I scan the complete source tree. Almost as if the matches are pulled in from other files.
For your convenience I have attached both the sourcecode and the result json.
sourcecode.zip
result.zip
How To Reproduce
System configuration
The text was updated successfully, but these errors were encountered: