Skip to content

Commit

Permalink
Merge pull request #261 from attestantio/golang_header
Browse files Browse the repository at this point in the history
Add goheader check and fix up template diffs
  • Loading branch information
Bez625 authored Oct 10, 2024
2 parents c0eef33 + 407ce2d commit d71b773
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions services/accountmanager/utils/utils.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion services/blockrelay/v2/baserelayconfig.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion services/blockrelay/v2/proposerrelayconfig.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion testutil/bytes.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion testutil/committees.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d71b773

Please sign in to comment.