Preparing report...

Report for github.com/bestateless/go-tc

A+    Excellent!    Found 22 issues across 147 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!


golint96%

Golint is a linter for Go source code.

    • go-tc/ematch.go
    • Line 9: warning: exported type EmatchLayer should have comment or be unexported (golint)
    • Line 12: warning: exported const EmatchLayerLink should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type EmatchOpnd should have comment or be unexported (golint)
    • Line 20: warning: exported const EmatchOpndEq should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type EmatchKind should have comment or be unexported (golint)
    • Line 54: warning: comment on exported type EmatchTreeHdr should be of the form "EmatchTreeHdr ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported type EmatchHdr should be of the form "EmatchHdr ..." (with optional leading article) (golint)
    • Line 68: warning: exported type EmatchMatch should have comment or be unexported (golint)
    • go-tc/ematch_cmp.go
    • Line 3: warning: exported type CmpMatchAlign should have comment or be unexported (golint)
    • Line 6: warning: exported const CmpMatchU8 should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type CmpMatchFlag should have comment or be unexported (golint)
    • Line 14: warning: exported const CmpMatchTrans should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type CmpMatch should have comment or be unexported (golint)
    • go-tc/m_action.go
    • Line 21: warning: exported const ActBind should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported const ActOk should have comment (or a comment on this block) or be unexported (golint)
    • go-tc/ratetable_test.go
    • Line 12: warning: don't use underscores in Go names; var rate_1kbit_burst_40_mtu_9k should be rate1kbitBurst40Mtu9k (golint)
    • Line 55: warning: don't use underscores in Go names; var rate_1mbit_burst_100k should be rate1mbitBurst100k (golint)
    • Line 98: warning: don't use underscores in Go names; var rate_8kbit_burst_5kb_peakrate_12kbit_mpu_64_mtu_1464_drop should be rate8kbitBurst5kbPeakrate12kbitMpu64Mtu1464Drop (golint)

gocyclo88%

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.

    • go-tc/filter.go
    • Line 95: warning: cyclomatic complexity 16 of function validateFilterObject() is high (> 15) (gocyclo)
    • go-tc/qdisc.go
    • Line 85: warning: cyclomatic complexity 42 of function validateQdiscObject() is high (> 15) (gocyclo)
    • go-tc/f_u32.go
    • Line 112: warning: cyclomatic complexity 20 of function unmarshalU32() is high (> 15) (gocyclo)
    • Line 43: warning: cyclomatic complexity 18 of function marshalU32() is high (> 15) (gocyclo)
    • go-tc/q_cbq.go
    • Line 32: warning: cyclomatic complexity 17 of function unmarshalCbq() is high (> 15) (gocyclo)
    • go-tc/f_flower.go
    • Line 396: warning: cyclomatic complexity 79 of function marshalFlower() is high (> 15) (gocyclo)
    • Line 173: warning: cyclomatic complexity 73 of function unmarshalFlower() is high (> 15) (gocyclo)
    • go-tc/attributeTcMsg.go
    • Line 121: warning: cyclomatic complexity 66 of function extractTCAOptions() is high (> 15) (gocyclo)
    • Line 9: warning: cyclomatic complexity 23 of function extractTcmsgAttributes() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 22 of function extractXStats() is high (> 15) (gocyclo)
    • go-tc/q_fq.go
    • Line 42: warning: cyclomatic complexity 16 of function unmarshalFq() is high (> 15) (gocyclo)
    • go-tc/tc.go
    • Line 251: warning: cyclomatic complexity 16 of function (*Tc).Monitor() is high (> 15) (gocyclo)
    • go-tc/m_action.go
    • Line 136: warning: cyclomatic complexity 36 of function marshalAction() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 30 of function extractActOptions() is high (> 15) (gocyclo)
    • go-tc/nest.go
    • Line 39: warning: cyclomatic complexity 24 of function marshalAttributes() is high (> 15) (gocyclo)
    • go-tc/q_netem.go
    • Line 88: warning: cyclomatic complexity 22 of function unmarshalNetem() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 17 of function marshalNetem() is high (> 15) (gocyclo)
    • go-tc/q_cake.go
    • Line 54: warning: cyclomatic complexity 22 of function unmarshalCake() is high (> 15) (gocyclo)
    • Line 123: warning: cyclomatic complexity 19 of function marshalCake() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!