Preparing report...

Report for github.com/vchain-us/vcn

A+    Excellent!    Found 44 issues across 134 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!


gocyclo93%

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.

    • vcn/pkg/cmd/sign/sign.go
    • Line 150: warning: cyclomatic complexity 46 of function runSignWithState() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 18 of function sign() is high (> 15) (gocyclo)

golint73%

Golint is a linter for Go source code.

    • vcn/pkg/cmd/internal/cli/credentials.go
    • Line 23: warning: exported function PromptMnemonic should have comment or be unexported (golint)
    • Line 34: warning: exported function PromptPassphrase should have comment or be unexported (golint)
    • Line 72: warning: exported function ProvidePassphrase should have comment or be unexported (golint)
    • Line 91: warning: exported function ProvidePasswordWithMessage should have comment or be unexported (golint)
    • Line 100: warning: exported function ProvidePlatformUsername should have comment or be unexported (golint)
    • Line 123: warning: exported function ProvidePlatformPassword should have comment or be unexported (golint)
    • Line 140: warning: exported function ProvideOtp should have comment or be unexported (golint)
    • vcn/pkg/api/lc_artifact.go
    • Line 47: warning: exported function ItemToLcArtifact should have comment or be unexported (golint)
    • Line 68: warning: exported function ZItemToLcArtifact should have comment or be unexported (golint)
    • Line 89: warning: exported function VerifiableItemExtToLcArtifact should have comment or be unexported (golint)
    • Line 110: warning: exported type LcArtifact should have comment or be unexported (golint)
    • Line 268: warning: exported function AppendPrefix should have comment or be unexported (golint)
    • Line 275: warning: exported function AppendSignerId should have comment or be unexported (golint)
    • Line 282: warning: exported function AppendAttachment should have comment or be unexported (golint)
    • vcn/pkg/extractor/file/internal/sniff/pe.go
    • Line 16: warning: don't use underscores in Go names; const Platform_PE should be PlatformPE (golint)
    • Line 16: warning: exported const Platform_PE should have comment or be unexported (golint)
    • Line 43: warning: exported function PE should have comment or be unexported (golint)
    • vcn/pkg/cmd/internal/cli/lc_output.go
    • Line 28: warning: exported function PrintLc should have comment or be unexported (golint)
    • Line 52: warning: exported function WriteLcResultTo should have comment or be unexported (golint)
    • Line 147: warning: exported function PrintLcSlice should have comment or be unexported (golint)
    • vcn/pkg/store/manifests.go
    • Line 19: warning: exported function ManifestFilepath should have comment or be unexported (golint)
    • Line 33: warning: exported function SaveManifest should have comment or be unexported (golint)
    • Line 41: warning: exported function ReadManifest should have comment or be unexported (golint)
    • vcn/pkg/api/lc_client.go
    • Line 28: warning: exported function NewLcClientByContext should have comment or be unexported (golint)
    • Line 32: warning: exported function NewLcClient should have comment or be unexported (golint)
    • vcn/pkg/api/lc_sign_options.go
    • Line 15: warning: comment on exported type LcSignOption should be of the form "LcSignOption ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function LcSignWithStatus should be of the form "LcSignWithStatus ..." (golint)
    • Line 51: warning: comment on exported function LcSignWithVisibility should be of the form "LcSignWithVisibility ..." (golint)
    • vcn/pkg/api/lc_user.go
    • Line 22: warning: comment on exported type LcUser should be of the form "LcUser ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported function NewLcUser should be of the form "NewLcUser ..." (golint)
    • Line 57: warning: comment on exported method User.User should be of the form "User ..." (golint)
    • Line 66: warning: exported function GetSignerIDByApiKey should have comment or be unexported (golint)
    • vcn/internal/errors/messages.go
    • Line 1: warning: package comment should be of the form "Package errors ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 12: warning: exported const AccountNotSynced should have comment or be unexported (golint)
    • Line 20: warning: exported const AuthRequired should have comment or be unexported (golint)
    • Line 22: warning: exported const UnconfirmedEmail should have comment or be unexported (golint)
    • Line 27: warning: exported const NoRemainingSignOps should have comment or be unexported (golint)
    • Line 33: warning: exported const TrialExpired should have comment or be unexported (golint)
    • Line 43: warning: exported const BlockchainTimeout should have comment or be unexported (golint)
    • Line 47: warning: exported const BlockchainCannotConnect should have comment or be unexported (golint)
    • Line 51: warning: exported const BlockchainContractErr should have comment or be unexported (golint)
    • Line 55: warning: exported const SignFailed should have comment or be unexported (golint)
    • Line 57: warning: exported const BlockchainSameHashAlreadyImported should have comment or be unexported (golint)
    • Line 59: warning: exported const BlockchainTxNonceTooLow should have comment or be unexported (golint)
    • Line 61: warning: exported var ErrNoLcApiKeyEnv should have comment or be unexported (golint)
    • vcn/internal/logs/log.go
    • Line 1: warning: package comment should be of the form "Package logs ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • vcn/pkg/extractor/file/internal/sniff/macho.go
    • Line 17: warning: don't use underscores in Go names; const Platform_MachO should be PlatformMachO (golint)
    • Line 17: warning: exported const Platform_MachO should have comment or be unexported (golint)
    • Line 19: warning: exported function MachO should have comment or be unexported (golint)
    • vcn/pkg/store/alerts.go
    • Line 19: warning: exported type Alert should have comment or be unexported (golint)
    • Line 25: warning: exported method Alert.ExportConfig should have comment or be unexported (golint)
    • Line 36: warning: exported type Alerts should have comment or be unexported (golint)
    • Line 51: warning: exported function AlertFilepath should have comment or be unexported (golint)
    • Line 59: warning: exported function SaveAlert should have comment or be unexported (golint)
    • Line 75: warning: exported function DeleteAlert should have comment or be unexported (golint)
    • Line 91: warning: exported function ReadAlerts should have comment or be unexported (golint)
    • vcn/pkg/cmd/internal/types/lc_result.go
    • Line 15: warning: exported type LcResult should have comment or be unexported (golint)
    • Line 21: warning: exported method LcResult.AddError should have comment or be unexported (golint)
    • Line 25: warning: exported function NewLcResult should have comment or be unexported (golint)
    • vcn/pkg/meta/constants.go
    • Line 79: warning: exported const VcnExitCode should have comment or be unexported (golint)
    • Line 81: warning: exported const VcnPrefix should have comment or be unexported (golint)
    • Line 83: warning: comment on exported const VcnLCPluginTypeHeaderName should be of the form "VcnLCPluginTypeHeaderName ..." (golint)
    • Line 85: warning: exported const VcnLCLedgerHeaderName should have comment or be unexported (golint)
    • Line 86: warning: exported const VcnLCVersionHeaderName should have comment or be unexported (golint)
    • Line 87: warning: exported const VcnLCPluginTypeHeaderValue should have comment or be unexported (golint)
    • Line 89: warning: exported const VcnLcHostFlagDesc should have comment or be unexported (golint)
    • Line 90: warning: exported const VcnLcPortFlagDesc should have comment or be unexported (golint)
    • Line 91: warning: exported const VcnLcCertPathDesc should have comment or be unexported (golint)
    • Line 92: warning: exported const VcnLcSkipTlsVerifyDesc should have comment or be unexported (golint)
    • Line 93: warning: exported const VcnLcNoTlsDesc should have comment or be unexported (golint)
    • Line 94: warning: exported const VcnLcApiKeyDesc should have comment or be unexported (golint)
    • Line 95: warning: exported const VcnLcLedgerDesc should have comment or be unexported (golint)
    • Line 96: warning: exported const VcnLcAttachDesc should have comment or be unexported (golint)
    • Line 97: warning: exported const VcnLcCIAttribDesc should have comment or be unexported (golint)
    • Line 98: warning: exported const VcnLcUidDesc should have comment or be unexported (golint)
    • Line 147: warning: exported method Status.Int should have comment or be unexported (golint)
    • Line 178: warning: exported const DateShortForm should have comment or be unexported (golint)
    • Line 179: warning: exported const IndexDateRangePrefix should have comment or be unexported (golint)
    • Line 181: warning: exported const VcnDefaultExitCode should have comment or be unexported (golint)
    • Line 183: warning: exported const AttachmentSeparator should have comment or be unexported (golint)
    • vcn/pkg/cicontext/meta.go
    • Line 11: warning: exported const CI_GITLAB_PREFIX should have comment or be unexported (golint)
    • Line 12: warning: exported const CI_GITHUB_PREFIX should have comment or be unexported (golint)
    • Line 14: warning: exported const CI_JENKINS_KEY should have comment or be unexported (golint)
    • Line 16: warning: exported const CI_GITLAB_DESC should have comment or be unexported (golint)
    • Line 17: warning: exported const CI_GITHUB_DESC should have comment or be unexported (golint)
    • Line 18: warning: exported const CI_JENKINS_DESC should have comment or be unexported (golint)
    • Line 20: warning: exported const CI_TYPE_KEY_NAME should have comment or be unexported (golint)
    • vcn/pkg/store/v2_config.go
    • Line 3: warning: comment on exported type UserV2 should be of the form "UserV2 ..." (with optional leading article) (golint)
    • Line 10: warning: comment on exported type ConfigRootV2 should be of the form "ConfigRootV2 ..." (with optional leading article) (golint)
    • vcn/pkg/cmd/internal/types/result.go
    • Line 15: warning: exported type Result should have comment or be unexported (golint)
    • Line 21: warning: exported method Result.AddError should have comment or be unexported (golint)
    • Line 25: warning: exported function NewResult should have comment or be unexported (golint)
    • vcn/pkg/cmd/internal/cli/output.go
    • Line 31: warning: exported function WriteResultTo should have comment or be unexported (golint)
    • Line 123: warning: exported function Print should have comment or be unexported (golint)
    • Line 145: warning: exported function PrintSlice should have comment or be unexported (golint)
    • Line 170: warning: exported function PrintList should have comment or be unexported (golint)
    • Line 194: warning: exported function PrintError should have comment or be unexported (golint)
    • Line 219: warning: exported function PrintWarning should have comment or be unexported (golint)
    • Line 237: warning: exported function PrintObjects should have comment or be unexported (golint)
    • vcn/pkg/store/config.go
    • Line 39: warning: exported type CurrentContext should have comment or be unexported (golint)
    • Line 48: warning: exported method CurrentContext.Clear should have comment or be unexported (golint)
    • Line 136: warning: comment on exported method ConfigRoot.UserByMail should be of the form "UserByMail ..." (golint)
    • Line 163: warning: comment on exported method ConfigRoot.NewLcUser should be of the form "NewLcUser ..." (golint)
    • Line 178: warning: comment on exported method ConfigRoot.RemoveUserByMail should be of the form "RemoveUserByMail ..." (golint)
    • Line 204: warning: exported function CNLCContext should have comment or be unexported (golint)
    • Line 209: warning: exported function CNioContext should have comment or be unexported (golint)
    • vcn/pkg/api/sign.go
    • Line 30: warning: comment on exported var WrongPassphraseErr should be of the form "WrongPassphraseErr ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words