google / google/licensecheck

MIT License is not recognized when "MIT License" headline is missing or when line breaks are different

Open
#75 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
513
Forks
99
PR merge metrics
No merged PRs in 30d

Description

As the title says, licensecheck does not recognize the MIT license when the following is the case:

- headline "MIT License" is missing but the rest is still there and the same
- line wraps and breaks are different from the GitHub template (e.g. longer lines like when it was copied from https://opensource.org/license/mit)

Example repository where the LICENSE file was not recognized:

Commit that does not work: https://github.com/cookiengineer/gooey/blob/9a06b5f9398292df70a19b09b065035d59a63873/LICENSE.txt

Commit that does work: https://github.com/cookiengineer/gooey/blob/188363f4bbdfa26abf7ea1a8620ae41019628d23/LICENSE.txt

Example code to verify this behavior:

https://github.com/cookiengineer/fuckpkgsiteup

Execute the main.go to reproduce this problem:

```bash
# execute:
go run main.go;

# output:
LICENSE_MIT_working.txt:
98.8% of text covered by licenses:
MIT at [13:1072] IsURL=false
LICENSE_MIT_broken.txt:
0.0% of text covered by licenses:
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.