Preparing report...

Report for github.com/wzzhu/tensor

(v0.9.23)

A+    Excellent!    Found 57 issues across 170 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!


gofmt82%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo81%

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.

    • dense.go
    • Line 424: warning: cyclomatic complexity 62 of function (*Dense).MaskFromSlice() is high (> 15) (gocyclo)
    • dense_apply_test.go
    • Line 55: warning: cyclomatic complexity 19 of function getMutateFn() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 19 of function getMutateVal() is high (> 15) (gocyclo)
    • api_minmax.go
    • Line 5: warning: cyclomatic complexity 19 of function MinBetween() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 19 of function MaxBetween() is high (> 15) (gocyclo)
    • defaultengine_mapreduce.go
    • Line 13: warning: cyclomatic complexity 17 of function (StdEng).Map() is high (> 15) (gocyclo)
    • Line 252: warning: cyclomatic complexity 16 of function (StdEng).prepReduce() is high (> 15) (gocyclo)
    • dense_format.go
    • Line 258: warning: cyclomatic complexity 61 of function (*Dense).Format() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 17 of function (*fmtState).acceptableRune() is high (> 15) (gocyclo)
    • dense_linalg.go
    • Line 206: warning: cyclomatic complexity 25 of function (*Dense).TensorMul() is high (> 15) (gocyclo)
    • flags_test.go
    • Line 36: warning: cyclomatic complexity 18 of function TestDataOrder() is high (> 15) (gocyclo)
    • defaultengine_linalg.go
    • Line 120: warning: cyclomatic complexity 45 of function (StdEng).Dot() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 31 of function (StdEng).Trace() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 24 of function (StdEng).MatMul() is high (> 15) (gocyclo)
    • type_test.go
    • Line 29: warning: cyclomatic complexity 21 of function TestDtypeConversions() is high (> 15) (gocyclo)
    • ap.go
    • Line 215: warning: cyclomatic complexity 20 of function (*AP).S() is high (> 15) (gocyclo)
    • defaultengine_argmethods.go
    • Line 15: warning: cyclomatic complexity 19 of function (StdEng).argmaxDenseTensor() is high (> 15) (gocyclo)
    • Line 102: warning: cyclomatic complexity 19 of function (StdEng).argminDenseTensor() is high (> 15) (gocyclo)
    • api_arith.go
    • Line 20: warning: cyclomatic complexity 19 of function Add() is high (> 15) (gocyclo)
    • Line 346: warning: cyclomatic complexity 19 of function Pow() is high (> 15) (gocyclo)
    • Line 101: warning: cyclomatic complexity 19 of function Sub() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 19 of function Mul() is high (> 15) (gocyclo)
    • Line 265: warning: cyclomatic complexity 19 of function Div() is high (> 15) (gocyclo)
    • Line 427: warning: cyclomatic complexity 19 of function Mod() is high (> 15) (gocyclo)
    • dense_norms.go
    • Line 56: warning: cyclomatic complexity 78 of function (*Dense).Norm() is high (> 15) (gocyclo)
    • defaultengine_matop_misc.go
    • Line 244: warning: cyclomatic complexity 30 of function (StdEng).denseConcat() is high (> 15) (gocyclo)
    • Line 65: warning: cyclomatic complexity 17 of function (StdEng).denseRepeat() is high (> 15) (gocyclo)
    • shape.go
    • Line 117: warning: cyclomatic complexity 20 of function (Shape).Eq() is high (> 15) (gocyclo)
    • defaultengine_matop_stack.go
    • Line 183: warning: cyclomatic complexity 19 of function (StdEng).doViewStack2() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 19 of function (StdEng).doViewStack1() is high (> 15) (gocyclo)
    • Line 244: warning: cyclomatic complexity 19 of function (StdEng).doViewStack4() is high (> 15) (gocyclo)
    • Line 305: warning: cyclomatic complexity 19 of function (StdEng).doViewStack8() is high (> 15) (gocyclo)
    • Line 366: warning: cyclomatic complexity 19 of function (StdEng).doViewStackArbitrary() is high (> 15) (gocyclo)
    • utils.go
    • Line 134: warning: cyclomatic complexity 17 of function UnsafePermute() is high (> 15) (gocyclo)
    • api_utils.go
    • Line 55: warning: cyclomatic complexity 22 of function SampleIndex() is high (> 15) (gocyclo)
    • iterator_mult.go
    • Line 39: warning: cyclomatic complexity 16 of function NewMultIterator() is high (> 15) (gocyclo)
    • api_unary_test.go
    • Line 840: warning: cyclomatic complexity 45 of function TestTanh() is high (> 15) (gocyclo)
    • Line 1029: warning: cyclomatic complexity 29 of function TestLog2() is high (> 15) (gocyclo)
    • Line 351: warning: cyclomatic complexity 29 of function TestInvSqrt() is high (> 15) (gocyclo)
    • Line 650: warning: cyclomatic complexity 29 of function TestLog10() is high (> 15) (gocyclo)
    • Line 507: warning: cyclomatic complexity 29 of function TestInv() is high (> 15) (gocyclo)
    • testutils_test.go
    • Line 144: warning: cyclomatic complexity 33 of function allClose() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 22 of function (*Dense).Generate() is high (> 15) (gocyclo)
    • dense_matop_test.go
    • Line 1018: warning: cyclomatic complexity 36 of function TestDense_Stack() is high (> 15) (gocyclo)
    • Line 834: warning: cyclomatic complexity 23 of function TestDense_Concat() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words