Preparing report...

Report for github.com/LimeChain/hedera-eth-bridge-validator

A+    Excellent!    Found 91 issues across 123 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo99%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint26%

Golint is a linter for Go source code.

    • hedera-eth-bridge-validator/test/mocks/hedera-mirror-client/hedera_mirror_client_mock.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 25: warning: exported type MockHederaMirrorClient should have comment or be unexported (golint)
    • Line 29: warning: exported method MockHederaMirrorClient.GetAccountCreditTransactionsBetween should have comment or be unexported (golint)
    • Line 38: warning: exported method MockHederaMirrorClient.GetMessagesForTopicBetween should have comment or be unexported (golint)
    • Line 47: warning: exported method MockHederaMirrorClient.GetMessagesAfterTimestamp should have comment or be unexported (golint)
    • Line 56: warning: exported method MockHederaMirrorClient.WaitForTransaction should have comment or be unexported (golint)
    • Line 60: warning: exported method MockHederaMirrorClient.GetAccountCreditTransactionsAfterTimestamp should have comment or be unexported (golint)
    • Line 69: warning: exported method MockHederaMirrorClient.GetStateProof should have comment or be unexported (golint)
    • Line 79: warning: exported method MockHederaMirrorClient.AccountExists should have comment or be unexported (golint)
    • Line 84: warning: exported method MockHederaMirrorClient.TopicExists should have comment or be unexported (golint)
    • Line 89: warning: exported method MockHederaMirrorClient.GetTransaction should have comment or be unexported (golint)
    • Line 98: warning: exported method MockHederaMirrorClient.WaitForScheduledTransferTransaction should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/config/config.go
    • Line 35: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 47: warning: exported function GetConfig should have comment or be unexported (golint)
    • Line 66: warning: exported type Config should have comment or be unexported (golint)
    • Line 70: warning: exported type Validator should have comment or be unexported (golint)
    • Line 79: warning: exported type Clients should have comment or be unexported (golint)
    • Line 85: warning: exported type Recovery should have comment or be unexported (golint)
    • Line 89: warning: exported type Ethereum should have comment or be unexported (golint)
    • Line 96: warning: exported type Hedera should have comment or be unexported (golint)
    • Line 106: warning: exported type Operator should have comment or be unexported (golint)
    • Line 111: warning: exported type MirrorNode should have comment or be unexported (golint)
    • Line 117: warning: exported type Database should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/persistence/burn-event/burn-event.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 27: warning: exported type Repository should have comment or be unexported (golint)
    • Line 31: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 37: warning: exported method Repository.Create should have comment or be unexported (golint)
    • Line 46: warning: exported method Repository.UpdateStatusSubmitted should have comment or be unexported (golint)
    • Line 57: warning: exported method Repository.UpdateStatusCompleted should have comment or be unexported (golint)
    • Line 61: warning: exported method Repository.UpdateStatusFailed should have comment or be unexported (golint)
    • Line 73: warning: exported method Repository.Get should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/test/mocks/hedera-node-client/hedera_node_client_mock.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 25: warning: exported type MockHederaNodeClient should have comment or be unexported (golint)
    • Line 29: warning: exported method MockHederaNodeClient.GetClient should have comment or be unexported (golint)
    • Line 35: warning: exported method MockHederaNodeClient.SubmitTopicConsensusMessage should have comment or be unexported (golint)
    • Line 44: warning: exported method MockHederaNodeClient.SubmitScheduledTokenTransferTransaction should have comment or be unexported (golint)
    • Line 58: warning: exported method MockHederaNodeClient.SubmitScheduledHbarTransferTransaction should have comment or be unexported (golint)
    • Line 71: warning: exported method MockHederaNodeClient.SubmitScheduleSign should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/clients/hedera/mirror-node/client.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 32: warning: exported type Client should have comment or be unexported (golint)
    • Line 39: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 48: warning: exported method Client.GetAccountCreditTransactionsAfterTimestamp should have comment or be unexported (golint)
    • Line 108: warning: exported method Client.GetTransaction should have comment or be unexported (golint)
    • Line 114: warning: exported method Client.GetStateProof should have comment or be unexported (golint)
    • Line 124: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 130: warning: exported method Client.AccountExists should have comment or be unexported (golint)
    • Line 147: warning: exported method Client.TopicExists should have comment or be unexported (golint)
    • Line 264: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • hedera-eth-bridge-validator/test/mocks/setup.go
    • Line 28: warning: exported var MExchangeRateProvider should have comment or be unexported (golint)
    • Line 29: warning: exported var MTransferService should have comment or be unexported (golint)
    • Line 30: warning: exported var MDistributorService should have comment or be unexported (golint)
    • Line 31: warning: exported var MScheduledService should have comment or be unexported (golint)
    • Line 32: warning: exported var MFeeService should have comment or be unexported (golint)
    • Line 33: warning: exported var MBridgeContractService should have comment or be unexported (golint)
    • Line 34: warning: exported var MBurnEventRepository should have comment or be unexported (golint)
    • Line 35: warning: exported var MFeeRepository should have comment or be unexported (golint)
    • Line 36: warning: exported var MHederaMirrorClient should have comment or be unexported (golint)
    • Line 37: warning: exported var MHederaNodeClient should have comment or be unexported (golint)
    • Line 38: warning: exported var MDatabase should have comment or be unexported (golint)
    • Line 40: warning: exported function Setup should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/test/mocks/repository/fee_repository_mock.go
    • Line 8: warning: exported type MockFeeRepository should have comment or be unexported (golint)
    • Line 12: warning: exported method MockFeeRepository.Create should have comment or be unexported (golint)
    • Line 20: warning: exported method MockFeeRepository.UpdateStatusCompleted should have comment or be unexported (golint)
    • Line 28: warning: exported method MockFeeRepository.UpdateStatusFailed should have comment or be unexported (golint)
    • Line 36: warning: exported method MockFeeRepository.Get should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/persistence/db.go
    • Line 30: warning: exported type Database should have comment or be unexported (golint)
    • Line 34: warning: exported method Database.GetConnection should have comment or be unexported (golint)
    • Line 38: warning: exported function NewDatabase should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function Connect should be of the form "Connect ..." (golint)
    • Line 87: warning: comment on exported function ConnectWithMigration should be of the form "ConnectWithMigration ..." (golint)
    • hedera-eth-bridge-validator/e2e/service/database/service.go
    • Line 41: warning: exported type Service should have comment or be unexported (golint)
    • Line 46: warning: exported function NewService should have comment or be unexported (golint)
    • Line 64: warning: exported method Service.VerifyTransferAndSignatureRecords should have comment or be unexported (golint)
    • Line 142: warning: exported method Service.VerifyBurnRecord should have comment or be unexported (golint)
    • Line 155: warning: exported method Service.VerifyFeeRecord should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/persistence/message/message.go
    • Line 25: warning: exported type Repository should have comment or be unexported (golint)
    • Line 29: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 35: warning: exported method Repository.GetMessageWith should have comment or be unexported (golint)
    • Line 46: warning: exported method Repository.Exist should have comment or be unexported (golint)
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: exported method Repository.Create should have comment or be unexported (golint)
    • Line 62: warning: exported method Repository.Get should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/persistence/fee/fee.go
    • Line 28: warning: exported type Repository should have comment or be unexported (golint)
    • Line 33: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 40: warning: comment on exported method Repository.Get should be of the form "Get ..." (golint)
    • Line 58: warning: exported method Repository.Create should have comment or be unexported (golint)
    • Line 62: warning: exported method Repository.UpdateStatusCompleted should have comment or be unexported (golint)
    • Line 66: warning: exported method Repository.UpdateStatusFailed should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/test/mocks/repository/burn_event_repository_mock.go
    • Line 8: warning: exported type MockBurnEventRepository should have comment or be unexported (golint)
    • Line 12: warning: exported method MockBurnEventRepository.Create should have comment or be unexported (golint)
    • Line 20: warning: exported method MockBurnEventRepository.UpdateStatusSubmitted should have comment or be unexported (golint)
    • Line 28: warning: exported method MockBurnEventRepository.UpdateStatusCompleted should have comment or be unexported (golint)
    • Line 36: warning: exported method MockBurnEventRepository.UpdateStatusFailed should have comment or be unexported (golint)
    • Line 44: warning: exported method MockBurnEventRepository.Get should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/services/signer/eth/signer.go
    • Line 27: warning: exported type Signer should have comment or be unexported (golint)
    • Line 31: warning: exported function NewEthSigner should have comment or be unexported (golint)
    • Line 39: warning: exported method Signer.Sign should have comment or be unexported (golint)
    • Line 50: warning: exported method Signer.NewKeyTransactor should have comment or be unexported (golint)
    • Line 54: warning: exported method Signer.Address should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/test/mocks/bridge-provider.go
    • Line 27: warning: exported type MockBridgeContract should have comment or be unexported (golint)
    • Line 31: warning: exported method MockBridgeContract.Native should have comment or be unexported (golint)
    • Line 35: warning: exported method MockBridgeContract.Wrapped should have comment or be unexported (golint)
    • Line 39: warning: exported method MockBridgeContract.IsMember should have comment or be unexported (golint)
    • Line 43: warning: exported method MockBridgeContract.WatchBurnEventLogs should have comment or be unexported (golint)
    • Line 47: warning: exported method MockBridgeContract.GetBridgeContractAddress should have comment or be unexported (golint)
    • Line 51: warning: exported method MockBridgeContract.GetMembers should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/router/response/response.go
    • Line 24: warning: exported var ErrorInternalServerError should have comment or be unexported (golint)
    • Line 27: warning: exported type ErrResponse should have comment or be unexported (golint)
    • Line 33: warning: exported function ErrorResponse should have comment or be unexported (golint)
    • Line 40: warning: exported type HealthResponse should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/e2e/setup/config.go
    • Line 112: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 116: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 223: warning: exported function WrappedAsset should have comment or be unexported (golint)
    • Line 235: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 267: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 275: warning: exported type Tokens should have comment or be unexported (golint)
    • Line 280: warning: comment on exported type Hedera should be of the form "Hedera ..." (with optional leading article) (golint)
    • Line 292: warning: comment on exported type Sender should be of the form "Sender ..." (with optional leading article) (golint)
    • Line 298: warning: exported type Receiver should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/e2e/util/expectation.go
    • Line 33: warning: exported function PrepareExpectedBurnEventRecord should have comment or be unexported (golint)
    • Line 47: warning: exported function PrepareExpectedFeeRecord should have comment or be unexported (golint)
    • Line 72: warning: exported function PrepareExpectedTransfer should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/persistence/status/status.go
    • Line 32: warning: exported type Repository should have comment or be unexported (golint)
    • Line 37: warning: exported function NewRepositoryForStatus should have comment or be unexported (golint)
    • Line 55: warning: exported method Repository.GetLastFetchedTimestamp should have comment or be unexported (golint)
    • Line 66: warning: exported method Repository.CreateTimestamp should have comment or be unexported (golint)
    • Line 75: warning: exported method Repository.UpdateLastFetchedTimestamp should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/test/mocks/service/transfer_service_mock.go
    • Line 11: warning: exported type MockTransferService should have comment or be unexported (golint)
    • Line 15: warning: exported method MockTransferService.ProcessTransfer should have comment or be unexported (golint)
    • Line 23: warning: exported method MockTransferService.SanityCheckTransfer should have comment or be unexported (golint)
    • Line 34: warning: exported method MockTransferService.SaveRecoveredTxn should have comment or be unexported (golint)
    • Line 42: warning: exported method MockTransferService.InitiateNewTransfer should have comment or be unexported (golint)
    • Line 53: warning: exported method MockTransferService.TransferData should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/clients/ethereum/client.go
    • Line 66: warning: exported method Client.ChainID should have comment or be unexported (golint)
    • Line 70: warning: comment on exported method Client.GetClient should be of the form "GetClient ..." (golint)
    • Line 81: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 85: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 139: warning: exported method Client.WaitForConfirmations should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/e2e/clients/validator.go
    • Line 29: warning: exported type Validator should have comment or be unexported (golint)
    • Line 39: warning: exported method Validator.GetTransferData should have comment or be unexported (golint)
    • Line 56: warning: exported method Validator.GetEventTransactionID should have comment or be unexported (golint)
    • Line 79: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • hedera-eth-bridge-validator/app/persistence/transfer/transfer.go
    • Line 29: warning: exported type Repository should have comment or be unexported (golint)
    • Line 34: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 41: warning: comment on exported method Repository.GetByTransactionId should be of the form "GetByTransactionId ..." (golint)
    • Line 58: warning: exported method Repository.GetWithPreloads should have comment or be unexported (golint)
    • Line 77: warning: comment on exported method Repository.GetWithFee should be of the form "GetWithFee ..." (golint)
    • Line 95: warning: exported method Repository.GetInitialAndSignatureSubmittedTx should have comment or be unexported (golint)
    • Line 119: warning: exported method Repository.SaveRecoveredTxn should have comment or be unexported (golint)
    • Line 124: warning: exported method Repository.UpdateStatusCompleted should have comment or be unexported (golint)
    • Line 128: warning: exported method Repository.UpdateStatusSignatureSubmitted should have comment or be unexported (golint)
    • Line 140: warning: exported method Repository.UpdateStatusSignatureMined should have comment or be unexported (golint)
    • Line 144: warning: exported method Repository.UpdateStatusSignatureFailed should have comment or be unexported (golint)
    • Line 211: warning: exported method Repository.GetUnprocessedTransfers should have comment or be unexported (golint)
    • hedera-eth-bridge-validator/app/services/transfers/service.go
    • Line 42: warning: exported type Service should have comment or be unexported (golint)
    • Line 57: warning: exported function NewService should have comment or be unexported (golint)
    • Line 95: warning: comment on exported method Service.SanityCheckTransfer should be of the form "SanityCheckTransfer ..." (golint)
    • Line 99: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 104: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 109: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 181: warning: exported method Service.ProcessTransfer should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!