Preparing report...

Report for github.com/fastwego/wxpay

A+    Excellent!    Found 65 issues across 119 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!


golint46%

Golint is a linter for Go source code.

    • wxpay/client.go
    • Line 32: warning: comment on exported var WXPayServerUrl should be of the form "WXPayServerUrl ..." (golint)
    • Line 37: warning: comment on exported var RSAServerUrl should be of the form "RSAServerUrl ..." (golint)
    • Line 40: warning: comment on exported type Client should be of the form "Client ..." (with optional leading article) (golint)
    • wxpay/wxpay.go
    • Line 35: warning: comment on exported type WXPay should be of the form "WXPay ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 56: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 72: warning: comment on exported method WXPay.Sign should be of the form "Sign ..." (golint)
    • wxpay/util/aes_crypto.go
    • Line 24: warning: comment on exported function AESECBPKCS7Encrypt should be of the form "AESECBPKCS7Encrypt ..." (golint)
    • Line 49: warning: comment on exported function AESECBPKCS7Decrypt should be of the form "AESECBPKCS7Decrypt ..." (golint)
    • wxpay/util/util.go
    • Line 23: warning: exported type CDATA should have comment or be unexported (golint)
    • Line 25: warning: exported method CDATA.MarshalXML should have comment or be unexported (golint)
    • Line 31: warning: exported function StructToMapByXMLTag should have comment or be unexported (golint)
    • wxpay/server.go
    • Line 28: warning: comment on exported type Server should be of the form "Server ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported method Server.PaymentNotify should be of the form "PaymentNotify ..." (golint)
    • Line 70: warning: comment on exported method Server.RefundNotify should be of the form "RefundNotify ..." (golint)
    • wxpay/test/test.go
    • Line 26: warning: exported var MockWXPay should have comment or be unexported (golint)
    • Line 27: warning: exported var MockSvr should have comment or be unexported (golint)
    • Line 28: warning: exported var MockSvrHandler should have comment or be unexported (golint)
    • Line 31: warning: exported function Setup should have comment or be unexported (golint)
    • wxpay/util/string_map_xml.go
    • Line 74: warning: exported function Map2XML should have comment or be unexported (golint)
    • Line 85: warning: exported function XML2Map should have comment or be unexported (golint)
    • wxpay/types/types.go
    • Line 18: warning: exported const AccountTypeBasic should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported const FeeTypeCNY should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const SignTypeHMACSHA256 should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported const TradeTypeJSAPI should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported const BillTypeALL should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; const BillTypeRECHARGE_REFUND should be BillTypeRECHARGEREFUND (golint)
    • Line 48: warning: exported const TarType should have comment (or a comment on this block) or be unexported (golint)
    • wxpay/cmd/apiconfig.go
    • Line 17: warning: exported type Api should have comment or be unexported (golint)
    • Line 26: warning: exported type ApiGroup 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.


misspell99%

Misspell Finds commonly misspelled English words