dmgerman / ninka

a license identification tool for Source Code
http://ninka.turingmachine.org
GNU General Public License v2.0
105 stars 31 forks source link

MPLv2.0 is reported as UNKNOWN. #21

Closed wyhfrank closed 8 years ago

wyhfrank commented 9 years ago

It seems that ninka couldn't recognize Mozilla Public License Version 2.0.

Here's a license header from a C source file that I tried with:

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

The .license file from ninka is:

UNKNOWN;0;0;0;1;1;UNKNOWN,MPLv2part2

And .senttok file contains:

UNKNOWN;0;UNKNOWN;1;This Source Code Form is subject to the terms of the Mozilla Public License, v<dot> 2<dot>0:This Source Code Form is subject to the terms of the Mozilla Public License, v<dot> 2<dot>0.
MPLv2part2;10;;:If a copy of the MPL was not distributed with this file, You can obtain one at http<colon>//mozilla.org/MPL/2.0/.

Further more, if I use the standard version from its official website, which is, using https instead of http in the URL part, like this:

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

Then the .license file turns to be:

UNKNOWN;0;0;0;0;2;UNKNOWN,UNKNOWN

And .senttok file be:

UNKNOWN;0;UNKNOWN;1;This Source Code Form is subject to the terms of the Mozilla Public License, v<dot> 2<dot>0:This Source Code Form is subject to the terms of the Mozilla Public License, v<dot> 2<dot>0.
UNKNOWN;0;UNKNOWN;1;If a copy of the MPL was not distributed with this file, You can obtain one at https<colon>//mozilla.org/MPL/2.0/:If a copy of the MPL was not distributed with this file, You can obtain one at https<colon>//mozilla.org/MPL/2.0/.