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

license results not matching when different scores are used #223

Closed
balusarakesh opened this issue Mar 16, 2016 · 5 comments
Closed

license results not matching when different scores are used #223

balusarakesh opened this issue Mar 16, 2016 · 5 comments

Comments

@balusarakesh
Copy link
Collaborator

branch : #86
RPM : http://vault.centos.org/6.4/cr/x86_64/Packages/libnl-devel-1.1.4-2.el6.x86_64.rpm
file_location : /libnl-devel-1.1.4-2.el6.x86_64.rpm/usr/share/doc/libnl-devel-1.1.4/html/attr_8h_source.html
when the above file is scanned for license with a score of 50 :

{
   "results": [
    {

      "licenses": [
        {
          "key": "public-domain", 
          "score": 50.0, 
          "short_name": "Public Domain", 
          "start_line": 1, 
          "end_line": 1
        }, 
        {
          "key": "apache-1.0", 
          "score": 66.67, 
          "short_name": "Apache 1.0",
          "start_line": 1, 
          "end_line": 1
        }, 
        {
          "key": "artistic-2.0", 
          "score": 55.0, 
          "short_name": "Artistic 2.0", 
          "start_line": 28, 
          "end_line": 28
        }, 
        {
          "key": "gpl", 
          "score": 55.0, 
          "short_name": "GPL",
          "start_line": 28, 
          "end_line": 28
        }, 
        {
          "key": "lgpl-2.1", 
          "score": 57.14, 
          "short_name": "LGPL 2.1",
          "start_line": 29, 
          "end_line": 29
        }, 
        {
          "key": "motosoto-0.9.1", 
          "score": 50.0, 
          "short_name": "Motosoto 0.9.1", 
          "start_line": 30, 
          "end_line": 30
        }, 
        {
          "key": "gpl-3.0", 
          "score": 50.0, > /home/rakesh/Desktop/score_70.txt
          "short_name": "GPL 3.0",
          "start_line": 31, 
          "end_line": 31
        }, 
        {
          "key": "gpl", 
          "score": 50.0, 
          "short_name": "GPL", 
          "start_line": 33, 
          "end_line": 33
        }, 
        {
          "key": "pd-programming", 
          "score": 50.0, 
          "short_name": "PD'Programming License",
          "start_line": 314, 
          "end_line": 314
        }
      ]

when the above file is scanned for license with a score of 60 :

"results": [
    {
      "licenses": [
        {
          "key": "egenix-1.1.0", 
          "score": 75.0, 
          "short_name": "eGenix Public License 1.1.0", 
          "start_line": 1, 
          "end_line": 1
        }, 
        {
          "key": "vsl-1.0", 
          "score": 66.67, 
          "short_name": "Vovida Software License 1.0",
          "start_line": 31, 
          "end_line": 31
        }
      ]

In the above scans apache-1.0 is detected when the score is set to 50 but it is not detected when the score is set to 60

commands used :
scancode --license /libnl-devel-1.1.4/html/attr_8h_source.html --license-score 50

@pombredanne
Copy link
Member

Thanks for the report. Good bug!

@balusarakesh
Copy link
Collaborator Author

fixed

@pombredanne
Copy link
Member

@balusarakesh what do you mean by "fixed"? is this working now in the #86 branch?

@pombredanne pombredanne reopened this Jul 20, 2016
@balusarakesh
Copy link
Collaborator Author

@pombredanne yes, this bug is fixed in the #86 branch

@pombredanne pombredanne modified the milestone: v2.0 Aug 5, 2016
@pombredanne
Copy link
Member

This has been merged and fixed in develop. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants