Preparing report...

Report for github.com/onmax/go-alastria

A+    Excellent!    Found 10 issues across 18 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!


gocyclo100%

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.

No problems detected. Good job!


golint50%

Golint is a linter for Go source code.

    • go-alastria/tokens/alastria_token.go
    • Line 3: warning: exported type AT should have comment or be unexported (golint)
    • Line 8: warning: exported type ATPayload should have comment or be unexported (golint)
    • Line 25: warning: comment on exported function CreateAlastriaToken should be of the form "CreateAlastriaToken ..." (golint)
    • Line 45: warning: comment on exported function ValidateAlastriaToken should be of the form "ValidateAlastriaToken ..." (golint)
    • go-alastria/tokens/credential.go
    • Line 5: warning: exported type Credential should have comment or be unexported (golint)
    • Line 10: warning: exported type CredentialPayload should have comment or be unexported (golint)
    • Line 20: warning: exported type CredentialPayloadVC should have comment or be unexported (golint)
    • Line 29: warning: comment on exported function CreateCredential should be of the form "CreateCredential ..." (golint)
    • Line 49: warning: comment on exported function ValidateCredential should be of the form "ValidateCredential ..." (golint)
    • go-alastria/tokens/presentation_request.go
    • Line 7: warning: exported type PR should have comment or be unexported (golint)
    • Line 12: warning: exported type PRPayload should have comment or be unexported (golint)
    • Line 22: warning: exported type PRPayloadVP should have comment or be unexported (golint)
    • Line 31: warning: exported type PRPayloadVPData should have comment or be unexported (golint)
    • Line 46: warning: comment on exported function CreatePresentationRequest should be of the form "CreatePresentationRequest ..." (golint)
    • Line 67: warning: comment on exported function ValidatePresentationRequest should be of the form "ValidatePresentationRequest ..." (golint)
    • go-alastria/crypto/secp256k1.go
    • Line 15: warning: comment on exported function Sign should be of the form "Sign ..." (golint)
    • Line 33: warning: exported function Verify should have comment or be unexported (golint)
    • Line 41: warning: exported function HexToECDSAPub should have comment or be unexported (golint)
    • go-alastria/tokens/alastria_session.go
    • Line 3: warning: exported type AS should have comment or be unexported (golint)
    • Line 8: warning: exported type ASPayload should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function CreateAlastriaSession should be of the form "CreateAlastriaSession ..." (golint)
    • Line 43: warning: comment on exported function ValidateAlastriaSession should be of the form "ValidateAlastriaSession ..." (golint)
    • go-alastria/tokens/timestamps.go
    • Line 8: warning: exported function CurrentTimestamp should have comment or be unexported (golint)
    • Line 12: warning: exported function ValidateTimestamps should have comment or be unexported (golint)
    • Line 34: warning: exported function ValidateIssuedAt should have comment or be unexported (golint)
    • Line 52: warning: exported function ValidateExpiresAt should have comment or be unexported (golint)
    • Line 67: warning: exported function ValidateNotBefore should have comment or be unexported (golint)
    • go-alastria/tokens/utils.go
    • Line 7: warning: exported type Header should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function StringInSlice should be of the form "StringInSlice ..." (golint)
    • Line 29: warning: comment on exported function ValidateHeader should be of the form "ValidateHeader ..." (golint)
    • Line 59: warning: exported function CheckMandatoryStringFieldsAreNotEmpty should have comment or be unexported (golint)
    • Line 68: warning: exported function CheckMandatoryStringArrayFieldsNotEmpty should have comment or be unexported (golint)
    • Line 77: warning: exported function CheckMandatoryStructFieldsAreNotEmpty should have comment or be unexported (golint)
    • Line 86: warning: comment on exported function AddDefaultValues should be of the form "AddDefaultValues ..." (golint)
    • Line 96: warning: comment on exported function ValidateEnum should be of the form "ValidateEnum ..." (golint)
    • Line 106: warning: exported function CheckLevelOfAssurance should have comment or be unexported (golint)
    • go-alastria/tokens/alastria_identity_creation.go
    • Line 3: warning: exported type AIC should have comment or be unexported (golint)
    • Line 8: warning: exported type AICPayload should have comment or be unexported (golint)
    • Line 24: warning: comment on exported function CreateAlastriaIdentityCreation should be of the form "CreateAlastriaIdentityCreation ..." (golint)
    • Line 44: warning: comment on exported function ValidateAlastriaIdentityCreation should be of the form "ValidateAlastriaIdentityCreation ..." (golint)
    • go-alastria/tokens/presentation.go
    • Line 5: warning: exported type Presentation should have comment or be unexported (golint)
    • Line 10: warning: exported type PresentationPayload should have comment or be unexported (golint)
    • Line 21: warning: exported type PresentationPayloadVP should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function CreatePresentation should be of the form "CreatePresentation ..." (golint)
    • Line 54: warning: comment on exported function ValidatePresentation should be of the form "ValidatePresentation ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!