From 791091e5a75bd6695814a586fde20019bfe50c72 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Thu, 10 Oct 2024 17:22:40 +0100 Subject: [PATCH] Add goheader check --- .gitignore | 6 ++++++ .golangci.yml | 18 ++++++++++++++++++ api/v1/blobsidecarevent.go | 13 +++++++++++++ api/v1/payloadattributesevent.go | 13 +++++++++++++ api/v1/peers.go | 13 +++++++++++++ http/json.go | 13 +++++++++++++ util/bellatrix/transactions.go | 13 +++++++++++++ util/capella/withdrawals.go | 13 +++++++++++++ 8 files changed, 102 insertions(+) diff --git a/.gitignore b/.gitignore index 8d09c99e..4b4eb8f4 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,11 @@ coverage.html # Vim *.sw? +# IntelliJ and friends +.idea/ + +# Makefile +Makefile + # Local TODO TODO.md diff --git a/.golangci.yml b/.golangci.yml index b94397e5..233a4f27 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -153,6 +153,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/api/v1/blobsidecarevent.go b/api/v1/blobsidecarevent.go index 8c1ad1bb..10208406 100644 --- a/api/v1/blobsidecarevent.go +++ b/api/v1/blobsidecarevent.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 v1 import ( diff --git a/api/v1/payloadattributesevent.go b/api/v1/payloadattributesevent.go index ef8175b6..f321da72 100644 --- a/api/v1/payloadattributesevent.go +++ b/api/v1/payloadattributesevent.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 v1 import ( diff --git a/api/v1/peers.go b/api/v1/peers.go index 004f5a95..8af96907 100644 --- a/api/v1/peers.go +++ b/api/v1/peers.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 v1 import ( diff --git a/http/json.go b/http/json.go index 08997fab..06318c75 100644 --- a/http/json.go +++ b/http/json.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 http import ( diff --git a/util/bellatrix/transactions.go b/util/bellatrix/transactions.go index eb992222..c6d701d9 100644 --- a/util/bellatrix/transactions.go +++ b/util/bellatrix/transactions.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 bellatrix import "github.com/attestantio/go-eth2-client/spec/bellatrix" diff --git a/util/capella/withdrawals.go b/util/capella/withdrawals.go index 80098291..8fa671fc 100644 --- a/util/capella/withdrawals.go +++ b/util/capella/withdrawals.go @@ -1,3 +1,16 @@ +// Copyright © 2023 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 capella import "github.com/attestantio/go-eth2-client/spec/capella"