From 407ce2dfacc9222021fa50738a2785aab8098a15 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Thu, 10 Oct 2024 16:10:57 +0100 Subject: [PATCH] Add goheader check and fix up template diffs --- .golangci.yml | 18 ++++++++++++++++++ services/accountmanager/utils/utils.go | 13 +++++++++++++ services/blockrelay/v2/baserelayconfig.go | 2 +- services/blockrelay/v2/proposerrelayconfig.go | 2 +- testutil/bytes.go | 2 +- testutil/committees.go | 2 +- 6 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9f437d54..4d6d74f9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -135,6 +135,24 @@ linters-settings: json: snake yaml: snake + goheader: + values: + regexp: + YEARS: '(20\d\d - 20\d\d|20\d\d, 20\d\d|20\d\d)' + template: |- + Copyright © {{ YEARS }} Attestant Limited. + 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. + linters: # Enable all available linters. # Default: false diff --git a/services/accountmanager/utils/utils.go b/services/accountmanager/utils/utils.go index 1338380a..f7995afe 100644 --- a/services/accountmanager/utils/utils.go +++ b/services/accountmanager/utils/utils.go @@ -1,3 +1,16 @@ +// Copyright © 2022 Attestant Limited. +// 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 utils import apiv1 "github.com/attestantio/go-eth2-client/api/v1" diff --git a/services/blockrelay/v2/baserelayconfig.go b/services/blockrelay/v2/baserelayconfig.go index e7f2fa3d..3df48ce3 100644 --- a/services/blockrelay/v2/baserelayconfig.go +++ b/services/blockrelay/v2/baserelayconfig.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Atestant Limited. +// Copyright © 2022 Attestant Limited. // 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 diff --git a/services/blockrelay/v2/proposerrelayconfig.go b/services/blockrelay/v2/proposerrelayconfig.go index 18ab3fe4..58284908 100644 --- a/services/blockrelay/v2/proposerrelayconfig.go +++ b/services/blockrelay/v2/proposerrelayconfig.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Atestant Limited. +// Copyright © 2022 Attestant Limited. // 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 diff --git a/testutil/bytes.go b/testutil/bytes.go index d46a25e3..2639f3e6 100644 --- a/testutil/bytes.go +++ b/testutil/bytes.go @@ -1,4 +1,4 @@ -// Copyright © 2020 Attestant Limited +// Copyright © 2020 Attestant Limited. // 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 diff --git a/testutil/committees.go b/testutil/committees.go index 44ce4de7..27c89e55 100644 --- a/testutil/committees.go +++ b/testutil/committees.go @@ -9,7 +9,7 @@ // 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 +// limitations under the License. package testutil