From fdbfc68f7cbffad933c7cb7ace67d434cf8a926e Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 12 Apr 2019 11:29:02 -0500 Subject: [PATCH 1/3] Add license headers to files missing them and CI check to verify they are present. Fixes #1633 --- .circleci/config.yml | 11 +++++++++++ Makefile | 7 +++++++ client.go | 14 ++++++++++++++ enterprise/enterprise.go | 14 ++++++++++++++ executor_internal_test.go | 14 ++++++++++++++ handler.go | 14 ++++++++++++++ http/translator.go | 14 ++++++++++++++ http/translator_test.go | 14 ++++++++++++++ inmem/translator.go | 14 ++++++++++++++ inmem/translator_test.go | 14 ++++++++++++++ internal/clustertests/cluster_test.go | 14 ++++++++++++++ mock/mock.go | 14 ++++++++++++++ mock/translator.go | 14 ++++++++++++++ roaring/container_stash.go | 14 ++++++++++++++ roaring/containers.go | 2 +- roaring/containers_btree.go | 2 +- roaring/containers_test.go | 2 +- roaring/inst.go | 14 ++++++++++++++ roaring/nop_inst.go | 14 ++++++++++++++ roaring/roaring_nop_paranoia.go | 14 ++++++++++++++ roaring/roaring_nop_stats.go | 14 ++++++++++++++ roaring/roaring_paranoia.go | 14 ++++++++++++++ roaring/roaring_stats.go | 14 ++++++++++++++ server/enterprise.go | 2 +- server/setup_logger.go | 14 ++++++++++++++ server/setup_logger_arm64.go | 14 ++++++++++++++ syswrap/mmap.go | 14 ++++++++++++++ syswrap/os.go | 14 ++++++++++++++ toml/toml.go | 14 ++++++++++++++ tracing/opentracing/opentracing.go | 14 ++++++++++++++ tracing/tracing.go | 14 ++++++++++++++ translate.go | 14 ++++++++++++++ translate_test.go | 14 ++++++++++++++ utils_internal_test.go | 2 +- 34 files changed, 401 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa6da2fda..677f1a57c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,6 +30,11 @@ jobs: - *fast-checkout - run: make install-gometalinter - run: make gometalinter + check-license-headers: + <<: *defaults + steps: + - *fast-checkout + - run: make check-license-headers test-build-arm: <<: *defaults steps: @@ -123,6 +128,9 @@ workflows: - linter: requires: - setup + - check-license-headers: + requires: + - setup - test-build-arm: requires: - setup @@ -144,10 +152,12 @@ workflows: - prerelease: requires: - linter + - check-license-headers - test-golang-1.12 - release: requires: - linter + - check-license-headers - test-golang-1.12 filters: tags: @@ -160,4 +170,5 @@ workflows: - dockerhub-upload: requires: - linter + - check-license-headers - test-golang-1.12 diff --git a/Makefile b/Makefile index 456456a7b..f3f1ab608 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ RELEASE_ENABLED = $(subst 0,,$(RELEASE)) BUILD_TAGS += $(if $(ENTERPRISE_ENABLED),enterprise) BUILD_TAGS += $(if $(RELEASE_ENABLED),release) BUILD_TAGS += shardwidth$(SHARD_WIDTH) +LICENSE_HASH=$(shell head -13 pilosa.go | shasum | cut -f 1 -d " ") export GO111MODULE=on # Run tests and compile Pilosa @@ -153,6 +154,12 @@ gometalinter: require-gometalinter vendor --exclude "^pql/pql.peg.go" \ ./... +# Verify that all Go files have license header +check-license-headers: + @! find . -name '*.go' | grep -v '^./vendor' | while read fn;\ + do [[ `head -13 $$fn | shasum | cut -f 1 -d " "` == $(LICENSE_HASH) ]] || echo $$fn; done | \ + grep -v apimethod_string.go | grep -v pb.go | grep -v peg.go | grep -v lru.go | grep -v btree + ###################### # Build dependencies # ###################### diff --git a/client.go b/client.go index 3762a27b9..3d09c2e08 100644 --- a/client.go +++ b/client.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pilosa import ( diff --git a/enterprise/enterprise.go b/enterprise/enterprise.go index a75223801..2075f7a4d 100644 --- a/enterprise/enterprise.go +++ b/enterprise/enterprise.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright (c) 2018 Pilosa Corp. All rights reserved. // // This file is part of Pilosa Enterprise Edition. diff --git a/executor_internal_test.go b/executor_internal_test.go index 4177968d5..ffb091d49 100644 --- a/executor_internal_test.go +++ b/executor_internal_test.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pilosa import ( diff --git a/handler.go b/handler.go index 5a452ce96..9089fd778 100644 --- a/handler.go +++ b/handler.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pilosa import ( diff --git a/http/translator.go b/http/translator.go index 3a2acae04..251715ede 100644 --- a/http/translator.go +++ b/http/translator.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package http import ( diff --git a/http/translator_test.go b/http/translator_test.go index ce96b3c2c..bec2089a5 100644 --- a/http/translator_test.go +++ b/http/translator_test.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package http_test import ( diff --git a/inmem/translator.go b/inmem/translator.go index 4e1e96b55..c5f976ea2 100644 --- a/inmem/translator.go +++ b/inmem/translator.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package inmem import ( diff --git a/inmem/translator_test.go b/inmem/translator_test.go index d4d232566..0a7c6eb34 100644 --- a/inmem/translator_test.go +++ b/inmem/translator_test.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package inmem_test import ( diff --git a/internal/clustertests/cluster_test.go b/internal/clustertests/cluster_test.go index f01835c10..612189c1b 100644 --- a/internal/clustertests/cluster_test.go +++ b/internal/clustertests/cluster_test.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package clustertest import ( diff --git a/mock/mock.go b/mock/mock.go index 97ebf8641..60fdfd200 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package mock import "sync" diff --git a/mock/translator.go b/mock/translator.go index 7a63d8cf0..ca5ef1e8e 100644 --- a/mock/translator.go +++ b/mock/translator.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package mock import ( diff --git a/roaring/container_stash.go b/roaring/container_stash.go index 9d3f82302..728730d64 100644 --- a/roaring/container_stash.go +++ b/roaring/container_stash.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package roaring import ( diff --git a/roaring/containers.go b/roaring/containers.go index cc9a09ec5..dc5d4118d 100644 --- a/roaring/containers.go +++ b/roaring/containers.go @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Pilosa Corp. All rights reserved. +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/roaring/containers_btree.go b/roaring/containers_btree.go index fb29a6d08..1d08f598c 100644 --- a/roaring/containers_btree.go +++ b/roaring/containers_btree.go @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Pilosa Corp. All rights reserved. +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/roaring/containers_test.go b/roaring/containers_test.go index 9c8bedd22..ad95f2f79 100644 --- a/roaring/containers_test.go +++ b/roaring/containers_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Pilosa Corp. All rights reserved. +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/roaring/inst.go b/roaring/inst.go index c0a5771d9..f9eaf2831 100644 --- a/roaring/inst.go +++ b/roaring/inst.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build btreeInstrumentation package roaring diff --git a/roaring/nop_inst.go b/roaring/nop_inst.go index 7a945cb6d..b5cd94458 100644 --- a/roaring/nop_inst.go +++ b/roaring/nop_inst.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build !btreeInstrumentation package roaring diff --git a/roaring/roaring_nop_paranoia.go b/roaring/roaring_nop_paranoia.go index ce9af8d54..6f2fa354b 100644 --- a/roaring/roaring_nop_paranoia.go +++ b/roaring/roaring_nop_paranoia.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build !roaringparanoia package roaring diff --git a/roaring/roaring_nop_stats.go b/roaring/roaring_nop_stats.go index c9e029ab7..2b1506953 100644 --- a/roaring/roaring_nop_stats.go +++ b/roaring/roaring_nop_stats.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build !roaringstats package roaring diff --git a/roaring/roaring_paranoia.go b/roaring/roaring_paranoia.go index 910e1bd40..6f7d0c57e 100644 --- a/roaring/roaring_paranoia.go +++ b/roaring/roaring_paranoia.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build roaringparanoia package roaring diff --git a/roaring/roaring_stats.go b/roaring/roaring_stats.go index fd8ade91f..046c0f087 100644 --- a/roaring/roaring_stats.go +++ b/roaring/roaring_stats.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build roaringstats package roaring diff --git a/server/enterprise.go b/server/enterprise.go index 6dd3e5540..021c00e7c 100644 --- a/server/enterprise.go +++ b/server/enterprise.go @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Pilosa Corp. All rights reserved. +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/setup_logger.go b/server/setup_logger.go index 06d61eced..3473faa43 100644 --- a/server/setup_logger.go +++ b/server/setup_logger.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build !arm64 package server diff --git a/server/setup_logger_arm64.go b/server/setup_logger_arm64.go index dd6718741..090ac1395 100644 --- a/server/setup_logger_arm64.go +++ b/server/setup_logger_arm64.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package server import ( diff --git a/syswrap/mmap.go b/syswrap/mmap.go index a13dff8af..95e819999 100644 --- a/syswrap/mmap.go +++ b/syswrap/mmap.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package syswrap wraps syscalls (just mmap right now) in order to impose a // global in-process limit on the maximum number of active mmaps. package syswrap diff --git a/syswrap/os.go b/syswrap/os.go index 8916d593b..1704b0759 100644 --- a/syswrap/os.go +++ b/syswrap/os.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package syswrap import ( diff --git a/toml/toml.go b/toml/toml.go index 5193ad787..acfb93079 100644 --- a/toml/toml.go +++ b/toml/toml.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package toml import "time" diff --git a/tracing/opentracing/opentracing.go b/tracing/opentracing/opentracing.go index aacc42d6e..47ec439fc 100644 --- a/tracing/opentracing/opentracing.go +++ b/tracing/opentracing/opentracing.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package opentracing import ( diff --git a/tracing/tracing.go b/tracing/tracing.go index 5792dd7ca..3625166b0 100644 --- a/tracing/tracing.go +++ b/tracing/tracing.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package tracing import ( diff --git a/translate.go b/translate.go index db129cd8f..6a49e4a7a 100644 --- a/translate.go +++ b/translate.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pilosa import ( diff --git a/translate_test.go b/translate_test.go index 2b5d35a49..a2f0b0268 100644 --- a/translate_test.go +++ b/translate_test.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package pilosa_test import ( diff --git a/utils_internal_test.go b/utils_internal_test.go index bf98f08a8..321f4846d 100644 --- a/utils_internal_test.go +++ b/utils_internal_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Pilosa Corp. All rights reserved. +// Copyright 2017 Pilosa Corp. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 3c1d3e3145580836ac9ee2d51d7d35fe6f1a079f Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 12 Apr 2019 11:35:34 -0500 Subject: [PATCH 2/3] Use bash for check-license-headers target --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index f3f1ab608..9ced6c510 100644 --- a/Makefile +++ b/Makefile @@ -155,6 +155,7 @@ gometalinter: require-gometalinter vendor ./... # Verify that all Go files have license header +check-license-headers: SHELL:=/bin/bash check-license-headers: @! find . -name '*.go' | grep -v '^./vendor' | while read fn;\ do [[ `head -13 $$fn | shasum | cut -f 1 -d " "` == $(LICENSE_HASH) ]] || echo $$fn; done | \ From b8ab44eb625bf3188521fff132684f6b4d6d5073 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 12 Apr 2019 11:57:28 -0500 Subject: [PATCH 3/3] Fix enterprise license header and add shardwidth files to license header check --- Makefile | 2 +- enterprise/enterprise.go | 14 -------------- shardwidth/16.go | 14 ++++++++++++++ shardwidth/17.go | 14 ++++++++++++++ shardwidth/18.go | 14 ++++++++++++++ shardwidth/19.go | 14 ++++++++++++++ shardwidth/20.go | 14 ++++++++++++++ shardwidth/21.go | 14 ++++++++++++++ shardwidth/22.go | 14 ++++++++++++++ shardwidth/23.go | 14 ++++++++++++++ shardwidth/24.go | 14 ++++++++++++++ shardwidth/25.go | 14 ++++++++++++++ shardwidth/26.go | 14 ++++++++++++++ shardwidth/27.go | 14 ++++++++++++++ shardwidth/28.go | 14 ++++++++++++++ shardwidth/29.go | 14 ++++++++++++++ shardwidth/30.go | 14 ++++++++++++++ shardwidth/31.go | 14 ++++++++++++++ shardwidth/32.go | 14 ++++++++++++++ 19 files changed, 239 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 9ced6c510..3fa415ccb 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ check-license-headers: SHELL:=/bin/bash check-license-headers: @! find . -name '*.go' | grep -v '^./vendor' | while read fn;\ do [[ `head -13 $$fn | shasum | cut -f 1 -d " "` == $(LICENSE_HASH) ]] || echo $$fn; done | \ - grep -v apimethod_string.go | grep -v pb.go | grep -v peg.go | grep -v lru.go | grep -v btree + grep -v apimethod_string.go | grep -v pb.go | grep -v peg.go | grep -v lru.go | grep -v btree | grep -v enterprise ###################### # Build dependencies # diff --git a/enterprise/enterprise.go b/enterprise/enterprise.go index 2075f7a4d..a75223801 100644 --- a/enterprise/enterprise.go +++ b/enterprise/enterprise.go @@ -1,17 +1,3 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Copyright (c) 2018 Pilosa Corp. All rights reserved. // // This file is part of Pilosa Enterprise Edition. diff --git a/shardwidth/16.go b/shardwidth/16.go index f9e90c047..6334bf254 100644 --- a/shardwidth/16.go +++ b/shardwidth/16.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth16 package shardwidth diff --git a/shardwidth/17.go b/shardwidth/17.go index 65653456e..b6ba8d907 100644 --- a/shardwidth/17.go +++ b/shardwidth/17.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth17 package shardwidth diff --git a/shardwidth/18.go b/shardwidth/18.go index 1357a3c17..f69647681 100644 --- a/shardwidth/18.go +++ b/shardwidth/18.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth18 package shardwidth diff --git a/shardwidth/19.go b/shardwidth/19.go index a3333540c..e9920326b 100644 --- a/shardwidth/19.go +++ b/shardwidth/19.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth19 package shardwidth diff --git a/shardwidth/20.go b/shardwidth/20.go index e45c5a472..5505656dd 100644 --- a/shardwidth/20.go +++ b/shardwidth/20.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build !shardwidth16,!shardwidth17,!shardwidth18,!shardwidth19,!shardwidth21,!shardwidth22,!shardwidth23,!shardwidth24,!shardwidth25,!shardwidth26,!shardwidth27,!shardwidth28,!shardwidth29,!shardwidth30,!shardwidth31,!shardwidth32 package shardwidth diff --git a/shardwidth/21.go b/shardwidth/21.go index edaf0a010..0ab1be104 100644 --- a/shardwidth/21.go +++ b/shardwidth/21.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth21 package shardwidth diff --git a/shardwidth/22.go b/shardwidth/22.go index ab75e51da..9b07fff50 100644 --- a/shardwidth/22.go +++ b/shardwidth/22.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth22 package shardwidth diff --git a/shardwidth/23.go b/shardwidth/23.go index 2535a2dee..03c5cd91c 100644 --- a/shardwidth/23.go +++ b/shardwidth/23.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth23 package shardwidth diff --git a/shardwidth/24.go b/shardwidth/24.go index b1275afd8..7e175b1bc 100644 --- a/shardwidth/24.go +++ b/shardwidth/24.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth24 package shardwidth diff --git a/shardwidth/25.go b/shardwidth/25.go index 9599ba5a3..776655580 100644 --- a/shardwidth/25.go +++ b/shardwidth/25.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth25 package shardwidth diff --git a/shardwidth/26.go b/shardwidth/26.go index e7dfdd13b..1459686bc 100644 --- a/shardwidth/26.go +++ b/shardwidth/26.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth26 package shardwidth diff --git a/shardwidth/27.go b/shardwidth/27.go index 568a798f8..9eb7ff830 100644 --- a/shardwidth/27.go +++ b/shardwidth/27.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth27 package shardwidth diff --git a/shardwidth/28.go b/shardwidth/28.go index bb43cd5a3..b3c38c944 100644 --- a/shardwidth/28.go +++ b/shardwidth/28.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth28 package shardwidth diff --git a/shardwidth/29.go b/shardwidth/29.go index f797b632d..e2b29faf1 100644 --- a/shardwidth/29.go +++ b/shardwidth/29.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth29 package shardwidth diff --git a/shardwidth/30.go b/shardwidth/30.go index aac761c82..a8684c236 100644 --- a/shardwidth/30.go +++ b/shardwidth/30.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth30 package shardwidth diff --git a/shardwidth/31.go b/shardwidth/31.go index 12f85bfcf..1dcd40ebb 100644 --- a/shardwidth/31.go +++ b/shardwidth/31.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth31 package shardwidth diff --git a/shardwidth/32.go b/shardwidth/32.go index 76dde6b04..d9408285b 100644 --- a/shardwidth/32.go +++ b/shardwidth/32.go @@ -1,3 +1,17 @@ +// Copyright 2017 Pilosa Corp. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // +build shardwidth32 package shardwidth