Skip to content

Commit

Permalink
Merge pull request #168 from attestantio/add_goheader
Browse files Browse the repository at this point in the history
Add goheader check
  • Loading branch information
Bez625 authored Oct 10, 2024
2 parents db17d01 + 791091e commit c1ba6e0
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ coverage.html
# Vim
*.sw?

# IntelliJ and friends
.idea/

# Makefile
Makefile

# Local TODO
TODO.md
18 changes: 18 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions api/v1/blobsidecarevent.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
13 changes: 13 additions & 0 deletions api/v1/payloadattributesevent.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
13 changes: 13 additions & 0 deletions api/v1/peers.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
13 changes: 13 additions & 0 deletions http/json.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
13 changes: 13 additions & 0 deletions util/bellatrix/transactions.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
13 changes: 13 additions & 0 deletions util/capella/withdrawals.go
Original file line number Diff line number Diff line change
@@ -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

Check warning on line 14 in util/capella/withdrawals.go

View workflow job for this annotation

GitHub Actions / revive

should have a package comment

import "github.com/attestantio/go-eth2-client/spec/capella"
Expand Down

0 comments on commit c1ba6e0

Please sign in to comment.