Skip to content

Commit

Permalink
license: allow github to detect MIT license (#743)
Browse files Browse the repository at this point in the history
Resolves #731

github uses https://github.com/licensee/licensee to detect
the license for the project.  Because the project contains a file
named "check_license.sh" it thinks this is a license file.  It is
unable to detect a license for that file and fails.  Here is the
run output:

```
< ./bin/licensee detect ../zap/
License:        NOASSERTION
Matched files:  LICENSE.txt, check_license.sh
LICENSE.txt:
  Content hash:  d64f3bb4282a97b37454b5bb96a8a264a3363dc3
  Attribution:   Copyright (c) 2016-2017 Uber Technologies, Inc.
  Confidence:    100.00%
  Matcher:       Licensee::Matchers::Exact
  License:       MIT
check_license.sh:
  Content hash:  2ca67b08b61b91f2b3c67fe4581ee9e8dc9da2e8
  License:       NOASSERTION
```

If you rename the file to checklicense.sh it won't think that it is a
license file and will correctly advertise zap as a MIT project

```
< ./bin/licensee detect ../zap/
License:        MIT
Matched files:  LICENSE.txt
LICENSE.txt:
  Content hash:  d64f3bb4282a97b37454b5bb96a8a264a3363dc3
  Attribution:   Copyright (c) 2016-2017 Uber Technologies, Inc.
  Confidence:    100.00%
  Matcher:       Licensee::Matchers::Exact
  License:       MIT
```
  • Loading branch information
cep21 authored and abhinav committed Sep 26, 2019
1 parent 4252145 commit d8445f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ifdef SHOULD_LINT
@echo "Checking for unresolved FIXMEs..."
@git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log
@echo "Checking for license headers..."
@./check_license.sh | tee -a lint.log
@./checklicense.sh | tee -a lint.log
@[ ! -s lint.log ]
else
@echo "Skipping linters on" $(GO_VERSION)
Expand Down
File renamed without changes.

0 comments on commit d8445f3

Please sign in to comment.