summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-25 11:33:19 -0500
committerChristopher Speller <crspeller@gmail.com>2017-10-25 09:33:19 -0700
commit5dd4466ab32d55f1369ad6a30670b3559ff41e11 (patch)
treeb26dd5e89550023ed8d8638fd54dc87276f2a75b
parent62b3569025347a1291229771f363be5962951f25 (diff)
downloadchat-5dd4466ab32d55f1369ad6a30670b3559ff41e11.tar.gz
chat-5dd4466ab32d55f1369ad6a30670b3559ff41e11.tar.bz2
chat-5dd4466ab32d55f1369ad6a30670b3559ff41e11.zip
add missing license headers, test to makefile (#7711)
-rw-r--r--Makefile5
-rw-r--r--cmd/platform/init.go3
-rw-r--r--model/bundle_info.go3
-rw-r--r--model/manifest.go3
-rw-r--r--plugin/api.go3
-rw-r--r--plugin/hooks.go3
-rw-r--r--plugin/pluginenv/environment.go3
-rw-r--r--plugin/pluginenv/options.go3
-rw-r--r--plugin/pluginenv/search_path.go3
-rw-r--r--plugin/plugintest/api.go3
-rw-r--r--plugin/plugintest/hooks.go3
-rw-r--r--plugin/rpcplugin/api.go3
-rw-r--r--plugin/rpcplugin/hooks.go3
-rw-r--r--plugin/rpcplugin/http.go3
-rw-r--r--plugin/rpcplugin/io.go3
-rw-r--r--plugin/rpcplugin/ipc.go3
-rw-r--r--plugin/rpcplugin/main.go3
-rw-r--r--plugin/rpcplugin/muxer.go3
-rw-r--r--plugin/rpcplugin/process.go3
-rw-r--r--plugin/rpcplugin/process_unix.go3
-rw-r--r--plugin/rpcplugin/supervisor.go3
-rw-r--r--plugin/supervisor.go3
-rwxr-xr-xscripts/license-check.sh28
-rw-r--r--store/constants.go3
-rw-r--r--store/sqlstore/file_info_store.go1
-rw-r--r--utils/i18n.go3
-rw-r--r--utils/inbucket.go3
-rw-r--r--utils/logger/log4go_json_writer.go3
-rw-r--r--utils/logger/logger.go3
-rw-r--r--utils/time.go3
30 files changed, 114 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ac00067ac..a32743ca6 100644
--- a/Makefile
+++ b/Makefile
@@ -271,7 +271,10 @@ gofmt:
done
@echo "gofmt success"; \
-check-style: govet gofmt
+check-licenses:
+ ./scripts/license-check.sh $(TE_PACKAGES) $(EE_PACKAGES)
+
+check-style: govet gofmt check-licenses
test-te-race:
@echo Testing TE race conditions
diff --git a/cmd/platform/init.go b/cmd/platform/init.go
index 145c754d1..a5db40a57 100644
--- a/cmd/platform/init.go
+++ b/cmd/platform/init.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package main
import (
diff --git a/model/bundle_info.go b/model/bundle_info.go
index 67b5dd0ed..6965159cc 100644
--- a/model/bundle_info.go
+++ b/model/bundle_info.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package model
type BundleInfo struct {
diff --git a/model/manifest.go b/model/manifest.go
index b466660af..4352a2bd2 100644
--- a/model/manifest.go
+++ b/model/manifest.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package model
import (
diff --git a/plugin/api.go b/plugin/api.go
index 4df6cb30a..e9a2892fc 100644
--- a/plugin/api.go
+++ b/plugin/api.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package plugin
import (
diff --git a/plugin/hooks.go b/plugin/hooks.go
index 7f0d8ae3c..c5daec45b 100644
--- a/plugin/hooks.go
+++ b/plugin/hooks.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package plugin
import (
diff --git a/plugin/pluginenv/environment.go b/plugin/pluginenv/environment.go
index 37bd1a482..62eb20e9d 100644
--- a/plugin/pluginenv/environment.go
+++ b/plugin/pluginenv/environment.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
// Package pluginenv provides high level functionality for discovering and launching plugins.
package pluginenv
diff --git a/plugin/pluginenv/options.go b/plugin/pluginenv/options.go
index 827520fac..35ecf1d7f 100644
--- a/plugin/pluginenv/options.go
+++ b/plugin/pluginenv/options.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package pluginenv
import (
diff --git a/plugin/pluginenv/search_path.go b/plugin/pluginenv/search_path.go
index f8617347d..698424332 100644
--- a/plugin/pluginenv/search_path.go
+++ b/plugin/pluginenv/search_path.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package pluginenv
import (
diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go
index 6c8646c23..c0e77648b 100644
--- a/plugin/plugintest/api.go
+++ b/plugin/plugintest/api.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package plugintest
import (
diff --git a/plugin/plugintest/hooks.go b/plugin/plugintest/hooks.go
index 721a709ea..56d048d6a 100644
--- a/plugin/plugintest/hooks.go
+++ b/plugin/plugintest/hooks.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package plugintest
import (
diff --git a/plugin/rpcplugin/api.go b/plugin/rpcplugin/api.go
index 4195a4f86..98333b1d9 100644
--- a/plugin/rpcplugin/api.go
+++ b/plugin/rpcplugin/api.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/hooks.go b/plugin/rpcplugin/hooks.go
index 18e4a6672..22f26e22e 100644
--- a/plugin/rpcplugin/hooks.go
+++ b/plugin/rpcplugin/hooks.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/http.go b/plugin/rpcplugin/http.go
index cfcb7419d..72b1aa445 100644
--- a/plugin/rpcplugin/http.go
+++ b/plugin/rpcplugin/http.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/io.go b/plugin/rpcplugin/io.go
index f4fdd3a1b..44b89956c 100644
--- a/plugin/rpcplugin/io.go
+++ b/plugin/rpcplugin/io.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/ipc.go b/plugin/rpcplugin/ipc.go
index 3e6c89c4f..e8dd43c04 100644
--- a/plugin/rpcplugin/ipc.go
+++ b/plugin/rpcplugin/ipc.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/main.go b/plugin/rpcplugin/main.go
index 241d70bc9..96a61c068 100644
--- a/plugin/rpcplugin/main.go
+++ b/plugin/rpcplugin/main.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/muxer.go b/plugin/rpcplugin/muxer.go
index 393a122c4..8a8ce8933 100644
--- a/plugin/rpcplugin/muxer.go
+++ b/plugin/rpcplugin/muxer.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/process.go b/plugin/rpcplugin/process.go
index 4b3362d68..a795be133 100644
--- a/plugin/rpcplugin/process.go
+++ b/plugin/rpcplugin/process.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/rpcplugin/process_unix.go b/plugin/rpcplugin/process_unix.go
index f196e34f8..142043cc6 100644
--- a/plugin/rpcplugin/process_unix.go
+++ b/plugin/rpcplugin/process_unix.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
// +build !windows
package rpcplugin
diff --git a/plugin/rpcplugin/supervisor.go b/plugin/rpcplugin/supervisor.go
index 7e37e2851..7b036d726 100644
--- a/plugin/rpcplugin/supervisor.go
+++ b/plugin/rpcplugin/supervisor.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package rpcplugin
import (
diff --git a/plugin/supervisor.go b/plugin/supervisor.go
index 5ddf5f169..f3e576e99 100644
--- a/plugin/supervisor.go
+++ b/plugin/supervisor.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package plugin
// Supervisor provides the interface for an object that controls the execution of a plugin.
diff --git a/scripts/license-check.sh b/scripts/license-check.sh
new file mode 100755
index 000000000..be3b62508
--- /dev/null
+++ b/scripts/license-check.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+set -e
+IFS=$'\n'
+count=0
+for fileType in GoFiles; do
+ for file in `go list -f $'{{range .GoFiles}}{{$.Dir}}/{{.}}\n{{end}}' "$@"`; do
+ case $file in
+ */utils/lru.go)
+ # Third-party, doesn't require a header.
+ ;;
+ *)
+ if ! grep 'Mattermost, Inc. All Rights Reserved.' $file -q; then
+ >&2 echo "FAIL: $file is missing a license header."
+ ((count++))
+ fi
+ esac
+ done
+done
+if [ $count -eq 0 ]; then
+ exit 0
+fi
+
+if [ $count -gt 1 ]; then
+ >&2 echo "$count files are missing license headers."
+else
+ >&2 echo "$count file is missing a license header."
+fi
+exit 1
diff --git a/store/constants.go b/store/constants.go
index f541c9747..6d3c4812e 100644
--- a/store/constants.go
+++ b/store/constants.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package store
const (
diff --git a/store/sqlstore/file_info_store.go b/store/sqlstore/file_info_store.go
index 165770962..1d0767d1e 100644
--- a/store/sqlstore/file_info_store.go
+++ b/store/sqlstore/file_info_store.go
@@ -1,3 +1,4 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package sqlstore
diff --git a/utils/i18n.go b/utils/i18n.go
index acb4f55ba..71e1aaee1 100644
--- a/utils/i18n.go
+++ b/utils/i18n.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package utils
import (
diff --git a/utils/inbucket.go b/utils/inbucket.go
index f80d16efd..53f6c759d 100644
--- a/utils/inbucket.go
+++ b/utils/inbucket.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package utils
import (
diff --git a/utils/logger/log4go_json_writer.go b/utils/logger/log4go_json_writer.go
index cc054dc6c..ede541b2b 100644
--- a/utils/logger/log4go_json_writer.go
+++ b/utils/logger/log4go_json_writer.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
// glue functions that allow logger.go to leverage log4Go to write JSON-formatted log records to a file
package logger
diff --git a/utils/logger/logger.go b/utils/logger/logger.go
index e81b24e9c..410a5a5fc 100644
--- a/utils/logger/logger.go
+++ b/utils/logger/logger.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
// this is a new logger interface for mattermost
package logger
diff --git a/utils/time.go b/utils/time.go
index baddd7329..5227887f7 100644
--- a/utils/time.go
+++ b/utils/time.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
package utils
import (