magiconair / properties

Java properties scanner for Go
BSD 2-Clause "Simplified" License
323 stars 77 forks source link

license #43

Closed damianoneill closed 4 years ago

damianoneill commented 4 years ago

would it be possible to rename the license file to LICENSE.md so that it can be picked up by https://github.com/mitchellh/golicense

Thanks, Damian.

magiconair commented 4 years ago

Sure

magiconair commented 4 years ago

but you'd need a new tagged version, right?

damianoneill commented 4 years ago

I'm unsure Frank, from the golicense homepage.

GitHub API: The license detected by golicense may be incorrect if a GitHub project changes licenses. golicense uses the GitHub API which only returns the license currently detected; we can't lookup licenses for specific commit hashes.

I'll try once you make the change and see if it works.

magiconair commented 4 years ago

already pushed

damianoneill commented 4 years ago

Sorry, Frank, I've misinformed you. It looks like the naming doesn't affect the Github API call, LICENSE would be fine. I had mistakenly looked a number of working dependencies in my project and all of them were LICENSE.md.

The problem seems to be that it can't match a tag in the LICENSE file. It doesn't know what sort of LICENSE this is, so Github seems to be returning 'license not found or detected'. This is reflected in your project when you look at the top right corner of the github page, it shows View License, instead of naming a specific License.

I suspect the only way to 'fix' this is to update the LICENSE file contents.

Again sorry that I misinformed you.

Damian.

damianoneill commented 4 years ago

This is the code that makes the call.

https://github.com/mitchellh/golicense/blob/master/license/github/repo_api.go

magiconair commented 4 years ago

No problem. I can fix the license to make sure that it is recognized.

magiconair commented 4 years ago

Can you try again?

image

damianoneill commented 4 years ago

Worked prefectly

$ golicense .approved-licenses.json /Users/doneill/go/bin/am
✅ github.com/mitchellh/go-homedir    MIT License
⚠️  github.com/magiconair/properties   BSD 2-Clause "Simplified" License
✅ github.com/spf13/cobra             Apache License 2.0

Thankyou.