Skip to content

Commit

Permalink
Make file copyright consistent and automated
Browse files Browse the repository at this point in the history
Signed-off-by: Saswata Mukherjee <[email protected]>
  • Loading branch information
saswatamcode committed Oct 18, 2023
1 parent b330abf commit c399b17
Show file tree
Hide file tree
Showing 224 changed files with 568 additions and 262 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ io/ioutil.{Discard,NopCloser,ReadAll,ReadDir,ReadFile,TempDir,TempFile,Writefile
@go vet -stdmethods=false ./...
@echo ">> linting all of the Go files GOGC=${GOGC}"
@$(GOLANGCI_LINT) run
# TODO(saswatamcode): Enable this in a separate commit.
# @echo ">> ensuring Copyright headers"
# @go run ./scripts/copyright
@echo ">> ensuring Copyright headers"
@go run ./scripts/copyright
$(call require_clean_work_tree,'detected files without copyright, run make lint and commit changes')
2 changes: 2 additions & 0 deletions collectors/metrics/cmd/metrics-collector/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package main

Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/cmd/metrics-collector/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package main

import (
Expand Down
3 changes: 2 additions & 1 deletion collectors/metrics/pkg/collectrule/evaluator.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package collectrule

Expand Down
4 changes: 3 additions & 1 deletion collectors/metrics/pkg/collectrule/evaluator_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package collectrule

import (
Expand Down
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/forwarder/forwarder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package forwarder

Expand Down
3 changes: 3 additions & 0 deletions collectors/metrics/pkg/forwarder/forwarder_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package forwarder

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/http/roundtripper.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package http

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/http/routes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package http

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/logger/logger.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package logger

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/anonymize.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/count.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/drop_timestamp.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/drop_timestamp_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/drop_unsorted.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/elide.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/elide_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/empty.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/expired.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
3 changes: 3 additions & 0 deletions collectors/metrics/pkg/metricfamily/hypershift_transformer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/invalid.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/label.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/multi_transformer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/none.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/pack.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/rename.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import clientmodel "github.com/prometheus/client_model/go"
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/required.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/sort.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/transform.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/transform_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/unsorted.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/whitelist.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/metricfamily/whitelist_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricfamily

import (
Expand Down
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/metricsclient/metricsclient.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricsclient

Expand Down
3 changes: 3 additions & 0 deletions collectors/metrics/pkg/metricsclient/metricsclient_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package metricsclient

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/reader/reader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package reader

import (
Expand Down
4 changes: 4 additions & 0 deletions collectors/metrics/pkg/reader/reader_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package reader

import (
Expand Down
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/simulator/simulator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package simulator

Expand Down
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/simulator/simulator_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package simulator

Expand Down
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/status/status.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package status

Expand Down
3 changes: 3 additions & 0 deletions collectors/metrics/pkg/status/status_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package status

import (
Expand Down
20 changes: 3 additions & 17 deletions examples/gen.go
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
// Copyright (c) 2022 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
/*
Copyright 2022.
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
// Licensed under the Apache License 2.0

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 main

/*
How to generate minio certs:
1. run `go run gen.go` to re-generate certs.
2. run `oc create secret generic minio-tls-secret --from-file=ca.crt=./minio-tls/certs/ca.crt --from-file=public.crt=./minio-tls/certs/public.crt --from-file=private.key=./minio-tls/certs/private.key --dry-run='client' -oyaml --namespace=open-cluster-management-observability > ./minio-tls/minio-tls-secret.yaml` to generate minio-tls-secret.yaml
*/

package main

import (
"crypto/rand"
"crypto/rsa"
Expand Down
3 changes: 2 additions & 1 deletion loaders/dashboards/cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package main

Expand Down
3 changes: 2 additions & 1 deletion loaders/dashboards/pkg/controller/dashboard_controller.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package controller

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package controller

Expand Down
3 changes: 2 additions & 1 deletion loaders/dashboards/pkg/util/grafana_util.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2021 Red Hat, Inc.
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package util

Expand Down
Loading

0 comments on commit c399b17

Please sign in to comment.