Skip to content

Commit

Permalink
Merge pull request #258 from attestantio/update_linter
Browse files Browse the repository at this point in the history
Enable linting of exported method comments
  • Loading branch information
Bez625 authored Sep 27, 2024
2 parents 3fe48c0 + 94c4a66 commit 949dd0a
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ issues:
exclude-files:
- ".*_ssz\\.go$"

include:
- 'EXC0002'
- 'EXC0005'
- 'EXC0009'
- 'EXC0011'
- 'EXC0012'
- 'EXC0014'

# Options for analysis running.
run:
# The default concurrency value is the number of available CPU.
Expand Down
1 change: 1 addition & 0 deletions mock/builderbidprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/attestantio/vouch/services/blockrelay"
)

// BuilderBidProvider obtains a builder bid.
type BuilderBidProvider struct{}

// BuilderBid returns a builder bid.
Expand Down
3 changes: 2 additions & 1 deletion mock/builderclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/attestantio/go-eth2-client/spec/phase0"
)

// BuilderClient is a mock.
type BuilderClient struct {
MockPubkey *phase0.BLSPubKey
}
Expand All @@ -40,7 +41,7 @@ func (m *BuilderClient) Pubkey() *phase0.BLSPubKey {
return m.MockPubkey
}

// BuilderBidProvider obtains a builder bid.
// BuilderBid obtains a builder bid.
func (*BuilderClient) BuilderBid(_ context.Context,
_ *builderapi.BuilderBidOpts,
) (
Expand Down
1 change: 1 addition & 0 deletions services/accountmanager/mock/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
e2wtypes "github.com/wealdtech/go-eth2-wallet-types/v2"
)

// ValidatingAccountsProvider is a mock.
type ValidatingAccountsProvider struct {
validatingAccounts map[phase0.ValidatorIndex]e2wtypes.Account
}
Expand Down
1 change: 1 addition & 0 deletions services/accountmanager/utils/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

var accountManagerAccounts *prometheus.GaugeVec

// RegisterMetrics registers metrics if appropriate for the monitor type.
func RegisterMetrics(ctx context.Context, monitor metrics.Service) error {
if monitor == nil {
// No monitor.
Expand Down
1 change: 1 addition & 0 deletions services/beaconblockproposer/standard/propose.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"golang.org/x/sync/semaphore"
)

// BlindedProposerWithExpectedPayload is the interface for handling blinded proposed beacon blocks.
type BlindedProposerWithExpectedPayload interface {
// BlindedProposalWithExpectedPayload fetches a blinded proposed beacon block for signing.
BlindedProposalWithExpectedPayload(context.Context,
Expand Down
1 change: 1 addition & 0 deletions services/blockrelay/standard/validatorregistrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"go.opentelemetry.io/otel"
)

// ValidatorRegistrations handles validator registrations.
func (s *Service) ValidatorRegistrations(ctx context.Context,
registrations []*types.SignedValidatorRegistration,
) (
Expand Down
1 change: 1 addition & 0 deletions services/blockrelay/v2/proposerrelayconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/shopspring/decimal"
)

// ProposerRelayConfig handles config information for the proposer relay.
type ProposerRelayConfig struct {
Disabled bool
PublicKey *phase0.BLSPubKey
Expand Down
1 change: 1 addition & 0 deletions services/synccommitteemessenger/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type Service interface {
RemoveHistoricDataUsedForSlotVerification(currentSlot phase0.Slot)
}

// SlotData contains sync committee data for a specific slot.
type SlotData struct {
Root phase0.Root
ValidatorToCommitteeIndex map[phase0.ValidatorIndex][]phase0.CommitteeIndex
Expand Down
1 change: 1 addition & 0 deletions services/synccommitteemessenger/standard/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func (s *Service) contributions(ctx context.Context,
return sigs, err
}

// AggregatorSignatureData contains validator signature data for a subcommittee.
type AggregatorSignatureData struct {
ValidatorIndex phase0.ValidatorIndex
Subcommittee uint64
Expand Down
2 changes: 1 addition & 1 deletion util/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package util

import "runtime/debug"

// CommitHah returns the commit hash of the build, if available.
// CommitHash returns the commit hash of the build, if available.
func CommitHash() string {
if info, ok := debug.ReadBuildInfo(); ok {
for _, setting := range info.Settings {
Expand Down

0 comments on commit 949dd0a

Please sign in to comment.