davglass / license-checker

Check NPM package licenses
Other
1.59k stars 215 forks source link

Incorrect license detection of guacamole-common-js@1.4.0-a #264

Closed Kexolotl closed 1 year ago

Kexolotl commented 1 year ago

Hi together, today I checked the license for our software code. I recognised that the license of GuacamoleCommonJS gets returned as BSD*.

"guacamole-common-js@1.4.0-a": {
    "licenses": "BSD*",
    "repository": "https://github.com/padarom/guacamole-common-js",
    "publisher": "Christopher Mühl",
    "email": "christopher@padarom.io"

In our older versions with guacamole-common-js@1.3.0 it was returned correctly as Apache2.0.

Can you help me with this?

khatkar commented 1 year ago

I think it happens because the logic in https://github.com/davglass/license-checker/blob/master/lib/license.js is matching first for the BSD template, so the Apache condition is never met. For BSD licenses, the code looks for the term distribution and use in source and binary forms, with or withou and for Apache it looks for term Apache License. But the license file for the guacamole module contains both! https://github.com/padarom/guacamole-common-js/blob/main/LICENSE

Kexolotl commented 1 year ago

Last time it was shown as

 {
        "licence": "Apache-2.0 & SIL Open Font & BSD-3-Clause",
        ....
 }

Something changed in the checker?

Kexolotl commented 1 year ago

Thx for your answer. I guess in the past my colleague fix this in the fixed-package.json. Haven't seen that this is fixed to a specific version.

khatkar commented 1 year ago

@schaefergregor This project is now being maintained at https://github.com/RSeidelsohn/license-checker-rseidelsohn See if the issue persists there, and report if so.