Preparing report...

Report for github.com/singchia/go-xtables

(v0.99.0)

A+    Excellent!    Found 15 issues across 77 files

Tweet

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!


gofmt98%

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


gocyclo87%

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.

    • iptables/match.go
    • Line 100: warning: cyclomatic complexity 68 of function (MatchType).String() is high (> 15) (gocyclo)
    • Line 252: warning: cyclomatic complexity 59 of function matchFactory() is high (> 15) (gocyclo)
    • Line 2507: warning: cyclomatic complexity 59 of function (*MatchConnTrack).Parse() is high (> 15) (gocyclo)
    • Line 8429: warning: cyclomatic complexity 37 of function (*MatchSCTP).Parse() is high (> 15) (gocyclo)
    • Line 4219: warning: cyclomatic complexity 34 of function (*MatchHashLimit).Parse() is high (> 15) (gocyclo)
    • Line 6845: warning: cyclomatic complexity 34 of function (*MatchPolicy).Parse() is high (> 15) (gocyclo)
    • Line 2392: warning: cyclomatic complexity 31 of function (*MatchConnTrack).ShortArgs() is high (> 15) (gocyclo)
    • Line 7229: warning: cyclomatic complexity 30 of function (*MatchRateEst).Parse() is high (> 15) (gocyclo)
    • Line 3040: warning: cyclomatic complexity 30 of function (*MatchDCCP).Parse() is high (> 15) (gocyclo)
    • Line 9571: warning: cyclomatic complexity 27 of function (*MatchTCP).Parse() is high (> 15) (gocyclo)
    • Line 8757: warning: cyclomatic complexity 26 of function (*MatchSet).Parse() is high (> 15) (gocyclo)
    • Line 5222: warning: cyclomatic complexity 22 of function (*MatchIPVS).Parse() is high (> 15) (gocyclo)
    • Line 7598: warning: cyclomatic complexity 21 of function (*MatchRecent).ShortArgs() is high (> 15) (gocyclo)
    • Line 8006: warning: cyclomatic complexity 20 of function (*MatchRT).Parse() is high (> 15) (gocyclo)
    • Line 6777: warning: cyclomatic complexity 20 of function (*MatchPolicy).ShortArgs() is high (> 15) (gocyclo)
    • Line 8097: warning: cyclomatic complexity 19 of function (SCTPType).String() is high (> 15) (gocyclo)
    • Line 4672: warning: cyclomatic complexity 19 of function (*MatchICMP).Parse() is high (> 15) (gocyclo)
    • Line 8695: warning: cyclomatic complexity 17 of function (*MatchSet).ShortArgs() is high (> 15) (gocyclo)
    • Line 6315: warning: cyclomatic complexity 17 of function (*MatchOwner).Parse() is high (> 15) (gocyclo)
    • Line 3904: warning: cyclomatic complexity 17 of function (*MatchFrag).Parse() is high (> 15) (gocyclo)
    • Line 9895: warning: cyclomatic complexity 17 of function (*MatchTime).Parse() is high (> 15) (gocyclo)
    • Line 7162: warning: cyclomatic complexity 17 of function (*MatchRateEst).ShortArgs() is high (> 15) (gocyclo)
    • Line 10326: warning: cyclomatic complexity 16 of function (*MatchUDP).Parse() is high (> 15) (gocyclo)
    • Line 7672: warning: cyclomatic complexity 16 of function (*MatchRecent).Parse() is high (> 15) (gocyclo)
    • ebtables/match.go
    • Line 2459: warning: cyclomatic complexity 53 of function (*MatchSTP).Parse() is high (> 15) (gocyclo)
    • Line 1400: warning: cyclomatic complexity 37 of function (*MatchIPv6).Parse() is high (> 15) (gocyclo)
    • Line 2330: warning: cyclomatic complexity 33 of function (*MatchSTP).ShortArgs() is high (> 15) (gocyclo)
    • Line 1087: warning: cyclomatic complexity 25 of function (*MatchIP).Parse() is high (> 15) (gocyclo)
    • Line 709: warning: cyclomatic complexity 21 of function (*MatchARP).Parse() is high (> 15) (gocyclo)
    • Line 1323: warning: cyclomatic complexity 21 of function (*MatchIPv6).ShortArgs() is high (> 15) (gocyclo)
    • Line 85: warning: cyclomatic complexity 18 of function matchFactory() is high (> 15) (gocyclo)
    • Line 649: warning: cyclomatic complexity 17 of function (*MatchARP).ShortArgs() is high (> 15) (gocyclo)
    • iptables/target.go
    • Line 267: warning: cyclomatic complexity 51 of function targetFactory() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 42 of function (TargetType).String() is high (> 15) (gocyclo)
    • Line 1612: warning: cyclomatic complexity 28 of function (*TargetCT).Parse() is high (> 15) (gocyclo)
    • Line 2368: warning: cyclomatic complexity 27 of function (*TargetHMark).Parse() is high (> 15) (gocyclo)
    • Line 2814: warning: cyclomatic complexity 26 of function (*TargetLog).Parse() is high (> 15) (gocyclo)
    • Line 1175: warning: cyclomatic complexity 25 of function (*TargetConnMark).Parse() is high (> 15) (gocyclo)
    • Line 1123: warning: cyclomatic complexity 16 of function (*TargetConnMark).ShortArgs() is high (> 15) (gocyclo)
    • Line 3772: warning: cyclomatic complexity 16 of function (RejectType).String() is high (> 15) (gocyclo)
    • iptables/parser.go
    • Line 72: warning: cyclomatic complexity 47 of function (*IPTables).parseRule() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 21 of function (*IPTables).parseChain() is high (> 15) (gocyclo)

ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • time.go
    • Line 32: warning: ineffectual assignment to sep (ineffassign)
    • Line 93: warning: ineffectual assignment to sep (ineffassign)
    • Line 32: warning: ineffectual assignment to sep (ineffassign)
    • Line 93: warning: ineffectual assignment to sep (ineffassign)
    • iptables/target.go
    • Line 3651: warning: ineffectual assignment to err (ineffassign)
    • Line 3654: warning: ineffectual assignment to unit (ineffassign)
    • Line 3656: warning: ineffectual assignment to unit (ineffassign)
    • Line 3658: warning: ineffectual assignment to unit (ineffassign)
    • Line 4375: warning: ineffectual assignment to source (ineffassign)
    • Line 3651: warning: ineffectual assignment to err (ineffassign)
    • Line 3654: warning: ineffectual assignment to unit (ineffassign)
    • Line 3656: warning: ineffectual assignment to unit (ineffassign)
    • Line 3658: warning: ineffectual assignment to unit (ineffassign)
    • Line 4375: warning: ineffectual assignment to source (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words

    • iptables/match.go
    • Line 3532: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3534: warning: "ect" is a misspelling of "etc" (misspell)
    • Line 3536: warning: "ect" is a misspelling of "etc" (misspell)
    • Line 3546: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3559: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3588: warning: "ect" is a misspelling of "etc" (misspell)
    • Line 3605: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3606: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3626: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 3628: warning: "ect" is a misspelling of "etc" (misspell)
    • Line 3632: warning: "ect" is a misspelling of "etc" (misspell)
    • pkg/network/service.go
    • Line 126: warning: "Protocl" is a misspelling of "Protocol" (misspell)
    • Line 246: warning: "managment" is a misspelling of "management" (misspell)
    • Line 777: warning: "managment" is a misspelling of "management" (misspell)
    • Line 1427: warning: "commonspace" is a misspelling of "commonplace" (misspell)
    • Line 1427: warning: "commonspace" is a misspelling of "commonplace" (misspell)
    • Line 2230: warning: "composit" is a misspelling of "compost" (misspell)
    • Line 2230: warning: "Composit" is a misspelling of "Compost" (misspell)
    • Line 2464: warning: "extensis" is a misspelling of "extensions" (misspell)
    • Line 2464: warning: "extensis" is a misspelling of "extensions" (misspell)
    • Line 2527: warning: "messanger" is a misspelling of "messenger" (misspell)
    • Line 2527: warning: "Messanger" is a misspelling of "Messenger" (misspell)
    • Line 2883: warning: "rendevous" is a misspelling of "rendezvous" (misspell)
    • Line 3237: warning: "Controll" is a misspelling of "Control" (misspell)
    • Line 4188: warning: "Messenging" is a misspelling of "Messaging" (misspell)
    • Line 5575: warning: "Aquisition" is a misspelling of "Acquisition" (misspell)
    • Line 5583: warning: "programmar" is a misspelling of "programmer" (misspell)