Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

license: allow github to detect MIT license #743

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
license: allow github to detect MIT license
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 committed Sep 25, 2019
commit 8671a73b3e1e7f927cce81d6dd96ebea6eb3e964
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.