Report for github.com/velo-protocol/DRSv1

A+    Excellent!    Found 107 issues across 259 files

Tweet

gofmt99%

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


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!


gocyclo98%

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.


golint61%

Golint is a linter for Go source code.

    • DRSv1/cmd/gvel/layers/commands/account/main.go
    • Line 13: warning: exported type CommandHandler should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCommandHandler should have comment or be unexported (golint)
    • Line 27: warning: exported method CommandHandler.Command should have comment or be unexported (golint)
    • Line 49: warning: exported method CommandHandler.GetCreateCommand should have comment or be unexported (golint)
    • Line 60: warning: exported method CommandHandler.GetListCommand should have comment or be unexported (golint)
    • Line 68: warning: exported method CommandHandler.GetDefaultCommand should have comment or be unexported (golint)
    • Line 76: warning: exported method CommandHandler.GetImportCommand should have comment or be unexported (golint)
    • Line 87: warning: exported method CommandHandler.GetExportCommand should have comment or be unexported (golint)
    • DRSv1/node/app/entities/drs_account.go
    • Line 9: warning: exported type DrsAccountData should have comment or be unexported (golint)
    • Line 20: warning: exported method DrsAccountData.VeloPriceAddress should have comment or be unexported (golint)
    • Line 33: warning: exported method DrsAccountData.RoleListAddress should have comment or be unexported (golint)
    • Line 46: warning: exported method DrsAccountData.DecodeBase64 should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/layers/commands/main.go
    • Line 15: warning: exported type GvelHandler should have comment or be unexported (golint)
    • Line 26: warning: exported function NewGvelHandler should have comment or be unexported (golint)
    • Line 35: warning: exported function NewGvelRootCommand should have comment or be unexported (golint)
    • Line 41: warning: exported method GvelHandler.Init should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/layers/commands/collateral/main.go
    • Line 13: warning: exported type CommandHandler should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCommandHandler should have comment or be unexported (golint)
    • Line 27: warning: exported method CommandHandler.Command should have comment or be unexported (golint)
    • Line 51: warning: exported method CommandHandler.GetHealthCheckCommand should have comment or be unexported (golint)
    • Line 60: warning: exported method CommandHandler.GetRebalanceReserveCommand should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/layers/commands/credit/main.go
    • Line 13: warning: exported type CommandHandler should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCommandHandler should have comment or be unexported (golint)
    • Line 27: warning: exported method CommandHandler.Command should have comment or be unexported (golint)
    • Line 52: warning: exported method CommandHandler.GetSetupCommand should have comment or be unexported (golint)
    • Line 62: warning: exported method CommandHandler.GetMintCommand should have comment or be unexported (golint)
    • Line 72: warning: exported method CommandHandler.GetExchangeRateCommand should have comment or be unexported (golint)
    • Line 82: warning: exported method CommandHandler.GetRedeemCommand should have comment or be unexported (golint)
    • DRSv1/node/app/errors/node_error.go
    • Line 8: warning: exported type NodeError should have comment or be unexported (golint)
    • Line 13: warning: exported type ErrInvalidArgument should have comment or be unexported (golint)
    • Line 21: warning: exported method ErrInvalidArgument.GRPCError should have comment or be unexported (golint)
    • Line 25: warning: exported type ErrNotFound should have comment or be unexported (golint)
    • Line 33: warning: exported method ErrNotFound.GRPCError should have comment or be unexported (golint)
    • Line 37: warning: exported type ErrAlreadyExists should have comment or be unexported (golint)
    • Line 45: warning: exported method ErrAlreadyExists.GRPCError should have comment or be unexported (golint)
    • Line 49: warning: exported type ErrPermissionDenied should have comment or be unexported (golint)
    • Line 57: warning: exported method ErrPermissionDenied.GRPCError should have comment or be unexported (golint)
    • Line 61: warning: exported type ErrUnAuthenticated should have comment or be unexported (golint)
    • Line 69: warning: exported method ErrUnAuthenticated.GRPCError should have comment or be unexported (golint)
    • Line 73: warning: exported type ErrInternal should have comment or be unexported (golint)
    • Line 81: warning: exported method ErrInternal.GRPCError should have comment or be unexported (golint)
    • Line 85: warning: exported type ErrPrecondition should have comment or be unexported (golint)
    • Line 93: warning: exported method ErrPrecondition.GRPCError should have comment or be unexported (golint)
    • DRSv1/node/app/testhelpers/data.go
    • Line 9: warning: exported const PublicKey1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported var Kp1 should have comment or be unexported (golint)
    • Line 51: warning: exported var DrsAccountDataEntity should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/utils/console/log.go
    • Line 8: warning: exported var Logger should have comment or be unexported (golint)
    • Line 9: warning: exported var TableLogger should have comment or be unexported (golint)
    • Line 11: warning: exported function InitLogger should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/utils/console/loading.go
    • Line 17: warning: exported var DefaultLoadWriter should have comment or be unexported (golint)
    • Line 19: warning: exported function StartLoading should have comment or be unexported (golint)
    • Line 34: warning: exported function StopLoading should have comment or be unexported (golint)
    • DRSv1/cmd/gvel/constants/default.go
    • Line 9: warning: exported var DefaultConfigFilePath should have comment or be unexported (golint)
    • Line 12: warning: exported const DefaultHorizonUrl should have comment (or a comment on this block) or be unexported (golint)
    • DRSv1/libs/xdr/role.go
    • Line 7: warning: exported const RoleTrustedPartner should have comment (or a comment on this block) or be unexported (golint)
    • DRSv1/cmd/gvel/layers/repositories/database/leveldb.go
    • Line 8: warning: exported type LevelDbDatabase should have comment or be unexported (golint)
    • Line 12: warning: exported function NewLevelDb should have comment or be unexported (golint)
    • Line 23: warning: exported method LevelDbDatabase.Init should have comment or be unexported (golint)
    • Line 28: warning: exported method LevelDbDatabase.Save should have comment or be unexported (golint)
    • Line 32: warning: exported method LevelDbDatabase.Get should have comment or be unexported (golint)
    • Line 36: warning: exported method LevelDbDatabase.GetAll should have comment or be unexported (golint)
    • DRSv1/libs/convert/keypair.go
    • Line 9: warning: exported function PublicKeyToKeyPair should have comment or be unexported (golint)
    • Line 22: warning: exported function SecretKeyToKeyPair should have comment or be unexported (golint)
    • DRSv1/libs/xdr/operation_type.go
    • Line 11: warning: exported const OperationTypeWhitelist should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported type PriceUpdateOp should be of the form "PriceUpdateOp ..." (with optional leading article) (golint)
    • DRSv1/node/app/constants/strings.go
    • Line 8: warning: exported var MaxTrustlineLimit should have comment or be unexported (golint)
    • Line 11: warning: exported const AssetCode should have comment (or a comment on this block) or be unexported (golint)
    • DRSv1/node/app/entities/get_exchange_rate.go
    • Line 11: warning: exported type GetExchangeRateInput should have comment or be unexported (golint)
    • Line 16: warning: exported method GetExchangeRateInput.Validate should have comment or be unexported (golint)
    • Line 36: warning: exported type GetExchangeRateOutPut should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!