Preparing report...

Report for github.com/ant-libs-go/security

A    Great!    Found 7 issues across 3 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!


golint33%

Golint is a linter for Go source code.

    • security/aes_ecb.go
    • Line 17: warning: exported type PADDING should have comment or be unexported (golint)
    • Line 20: warning: exported const ZERO_PADDING should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type AesEcb should have comment or be unexported (golint)
    • Line 30: warning: exported function NewAesEcb should have comment or be unexported (golint)
    • Line 39: warning: exported method AesEcb.Encrypt should have comment or be unexported (golint)
    • Line 68: warning: exported method AesEcb.Decrypt should have comment or be unexported (golint)
    • Line 100: warning: exported method AesEcb.ZeroPadding should have comment or be unexported (golint)
    • Line 106: warning: exported method AesEcb.ZeroUnPadding should have comment or be unexported (golint)
    • Line 112: warning: exported method AesEcb.PKCS5Padding should have comment or be unexported (golint)
    • Line 118: warning: exported method AesEcb.PKCS5UnPadding should have comment or be unexported (golint)
    • Line 125: warning: exported method AesEcb.PKCS7Padding should have comment or be unexported (golint)
    • Line 133: warning: exported method AesEcb.PKCS7UnPadding should have comment or be unexported (golint)
    • security/security.go
    • Line 21: warning: exported type Security should have comment or be unexported (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 39: warning: exported method Security.Encode should have comment or be unexported (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: exported method Security.Decode should have comment or be unexported (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 88: warning: exported method Security.PKCS7Pad should have comment or be unexported (golint)
    • Line 88: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 96: warning: exported method Security.PKCS7UPad should have comment or be unexported (golint)
    • Line 96: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: don't use underscores in Go names; method urlsafe_encode should be urlsafeEncode (golint)
    • Line 115: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 115: warning: don't use underscores in Go names; method urlsafe_decode should be urlsafeDecode (golint)
    • Line 130: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 134: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 138: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 143: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 144: warning: don't use underscores in Go names; var md5_sum should be md5Sum (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign-66%

IneffAssign detects ineffectual assignments in Go code.

    • /home/shawn/go/pkg/mod/github.com/golang/protobuf@v1.4.3/proto/extensions.go
    • Line 15: warning: missing go.sum entry for module providing package google.golang.org/protobuf/reflect/protoregistry (imported by github.com/golang/protobuf/proto); to add: (ineffassign)
    • Line 16: warning: missing go.sum entry for module providing package google.golang.org/protobuf/runtime/protoiface (imported by github.com/golang/protobuf/proto); to add: (ineffassign)
    • Line 15: warning: could not import google.golang.org/protobuf/reflect/protoregistry (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import google.golang.org/protobuf/runtime/protoiface (invalid package name: "") (ineffassign)
    • /home/shawn/go/pkg/mod/github.com/golang/protobuf@v1.4.3/proto/buffer.go
    • Line 11: warning: missing go.sum entry for module providing package google.golang.org/protobuf/encoding/prototext (imported by github.com/golang/protobuf/proto); to add: (ineffassign)
    • Line 12: warning: missing go.sum entry for module providing package google.golang.org/protobuf/encoding/protowire (imported by github.com/golang/protobuf/proto); to add: (ineffassign)
    • Line 13: warning: missing go.sum entry for module providing package google.golang.org/protobuf/runtime/protoimpl (imported by github.com/golang/protobuf/proto); to add: (ineffassign)
    • Line 11: warning: could not import google.golang.org/protobuf/encoding/prototext (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import google.golang.org/protobuf/encoding/protowire (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import google.golang.org/protobuf/runtime/protoimpl (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!