{"action":"opened","issue":{"url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/1313","repository_url":"https://api.github.com/repos/nexB/scancode-toolkit","labels_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/1313/labels{/name}","comments_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/1313/comments","events_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/1313/events","html_url":"https://github.com/nexB/scancode-toolkit/issues/1313","id":389540668,"node_id":"MDU6SXNzdWUzODk1NDA2Njg=","number":1313,"title":"Incorrect gpl-2.0 detection","user":{"login":"chinyeungli","id":4246379,"node_id":"MDQ6VXNlcjQyNDYzNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4246379?v=4","gravatar_id":"","url":"https://api.github.com/users/chinyeungli","html_url":"https://github.com/chinyeungli","followers_url":"https://api.github.com/users/chinyeungli/followers","following_url":"https://api.github.com/users/chinyeungli/following{/other_user}","gists_url":"https://api.github.com/users/chinyeungli/gists{/gist_id}","starred_url":"https://api.github.com/users/chinyeungli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinyeungli/subscriptions","organizations_url":"https://api.github.com/users/chinyeungli/orgs","repos_url":"https://api.github.com/users/chinyeungli/repos","events_url":"https://api.github.com/users/chinyeungli/events{/privacy}","received_events_url":"https://api.github.com/users/chinyeungli/received_events","type":"User","site_admin":false},"labels":[{"id":231147196,"node_id":"MDU6TGFiZWwyMzExNDcxOTY=","url":"https://api.github.com/repos/nexB/scancode-toolkit/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"pombredanne","id":675997,"node_id":"MDQ6VXNlcjY3NTk5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/675997?v=4","gravatar_id":"","url":"https://api.github.com/users/pombredanne","html_url":"https://github.com/pombredanne","followers_url":"https://api.github.com/users/pombredanne/followers","following_url":"https://api.github.com/users/pombredanne/following{/other_user}","gists_url":"https://api.github.com/users/pombredanne/gists{/gist_id}","starred_url":"https://api.github.com/users/pombredanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pombredanne/subscriptions","organizations_url":"https://api.github.com/users/pombredanne/orgs","repos_url":"https://api.github.com/users/pombredanne/repos","events_url":"https://api.github.com/users/pombredanne/events{/privacy}","received_events_url":"https://api.github.com/users/pombredanne/received_events","type":"User","site_admin":false},"assignees":[{"login":"pombredanne","id":675997,"node_id":"MDQ6VXNlcjY3NTk5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/675997?v=4","gravatar_id":"","url":"https://api.github.com/users/pombredanne","html_url":"https://github.com/pombredanne","followers_url":"https://api.github.com/users/pombredanne/followers","following_url":"https://api.github.com/users/pombredanne/following{/other_user}","gists_url":"https://api.github.com/users/pombredanne/gists{/gist_id}","starred_url":"https://api.github.com/users/pombredanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pombredanne/subscriptions","organizations_url":"https://api.github.com/users/pombredanne/orgs","repos_url":"https://api.github.com/users/pombredanne/repos","events_url":"https://api.github.com/users/pombredanne/events{/privacy}","received_events_url":"https://api.github.com/users/pombredanne/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-12-11T00:04:27Z","updated_at":"2018-12-11T00:04:27Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If I run scancode on the following text\r\n```\r\n/*\r\n * lib/handlers.c\tdefault netlink message handlers\r\n *\r\n *\tThis library is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation version 2.1\r\n *\tof the License.\r\n *\r\n * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>\r\n */\r\n```\r\nThe scancode detects it alright\r\n```\r\n          \"start_line\": 5,\r\n          \"end_line\": 8,\r\n          \"matched_rule\": {\r\n            \"identifier\": \"lgpl-2.1-plus_69.RULE\",\r\n            \"license_expression\": \"lgpl-2.1-plus\",\r\n            \"licenses\": [\r\n              \"lgpl-2.1-plus\"\r\n            ],\r\n```\r\n\r\nHowever, if I run scancode on the whole file\r\nhttps://android.googlesource.com/platform/external/libnl/+/master/lib/handlers.c\r\n\r\nit detects it as `gpl-2.0`\r\n```\r\n          \"start_line\": 4,\r\n          \"end_line\": 7,\r\n          \"matched_rule\": {\r\n            \"identifier\": \"gpl-2.0_51.RULE\",\r\n            \"license_expression\": \"gpl-2.0\",\r\n            \"licenses\": [\r\n              \"gpl-2.0\"\r\n            ],\r\n```\r\nwhich is incorrect.\r\n"}}
{"actor":{"display_login":"chinyeungli"}}