Preparing report...

Report for gorgonia.org/gorgonia

(v0.9.18)

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


gofmt73%

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

    • nn.go
    • Line 1: warning: file is not gofmted with -s (gofmt)
    • vm.go
    • Line 1: warning: file is not gofmted with -s (gofmt)
    • op.go
    • Line 1: warning: file is not gofmted with -s (gofmt)

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.

    • equalities.go
    • Line 8: warning: cyclomatic complexity 22 of function scalarEq() is high (> 15) (gocyclo)
    • regalloc.go
    • Line 163: warning: cyclomatic complexity 20 of function (*regalloc).allocMutableOp() is high (> 15) (gocyclo)
    • analysis_test.go
    • Line 11: warning: cyclomatic complexity 17 of function TestBuildIntervals() is high (> 15) (gocyclo)
    • analysis.go
    • Line 222: warning: cyclomatic complexity 17 of function (*dataflow).buildIntervals() is high (> 15) (gocyclo)
    • stabilization.go
    • Line 29: warning: cyclomatic complexity 16 of function logStabilization() is high (> 15) (gocyclo)
    • operatorPointwise_binary.go
    • Line 40: warning: cyclomatic complexity 93 of function (scalarBinOp).Do() is high (> 15) (gocyclo)
    • Line 662: warning: cyclomatic complexity 31 of function hadamardProdDiff() is high (> 15) (gocyclo)
    • Line 544: warning: cyclomatic complexity 25 of function subDiff() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 19 of function addDiff() is high (> 15) (gocyclo)
    • examples/convnet/main.go
    • Line 83: warning: cyclomatic complexity 18 of function (*convnet).fwd() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 16 of function main() is high (> 15) (gocyclo)
    • nn.go
    • Line 211: warning: cyclomatic complexity 18 of function Conv2d() is high (> 15) (gocyclo)
    • collections.go
    • Line 64: warning: cyclomatic complexity 16 of function (Nodes).Format() is high (> 15) (gocyclo)
    • solvers.go
    • Line 461: warning: cyclomatic complexity 49 of function (*AdamSolver).Step() is high (> 15) (gocyclo)
    • Line 975: warning: cyclomatic complexity 41 of function (*Momentum).Step() is high (> 15) (gocyclo)
    • Line 780: warning: cyclomatic complexity 36 of function (*VanillaSolver).Step() is high (> 15) (gocyclo)
    • Line 1203: warning: cyclomatic complexity 30 of function (*AdaGradSolver).Step() is high (> 15) (gocyclo)
    • Line 1408: warning: cyclomatic complexity 27 of function (*BarzilaiBorweinSolver).Step() is high (> 15) (gocyclo)
    • Line 1593: warning: cyclomatic complexity 26 of function (*AdamW).Step() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 22 of function (*RMSPropSolver).Step() is high (> 15) (gocyclo)
    • compile_test.go
    • Line 68: warning: cyclomatic complexity 19 of function TestCompile_CompileFn() is high (> 15) (gocyclo)
    • cuda/linalg.go
    • Line 110: warning: cyclomatic complexity 37 of function (*Engine).MatMul() is high (> 15) (gocyclo)
    • graph_test.go
    • Line 247: warning: cyclomatic complexity 33 of function TestGraph_Clone() is high (> 15) (gocyclo)
    • x/vm/node_test.go
    • Line 314: warning: cyclomatic complexity 21 of function Test_newOp() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 18 of function compareNodes() is high (> 15) (gocyclo)
    • weights.go
    • Line 56: warning: cyclomatic complexity 17 of function RangedFromWithStep() is high (> 15) (gocyclo)
    • op_ctc_loss.go
    • Line 305: warning: cyclomatic complexity 27 of function (*ctcLossOp).f32s() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 27 of function (*ctcLossOp).f64s() is high (> 15) (gocyclo)
    • Line 748: warning: cyclomatic complexity 23 of function (*ctcLossDiffOp).f32s() is high (> 15) (gocyclo)
    • Line 579: warning: cyclomatic complexity 23 of function (*ctcLossDiffOp).f64s() is high (> 15) (gocyclo)
    • complex_test.go
    • Line 8: warning: cyclomatic complexity 23 of function TestWeirdNetwork() is high (> 15) (gocyclo)
    • node_test.go
    • Line 9: warning: cyclomatic complexity 20 of function TestNodeBasics() is high (> 15) (gocyclo)
    • operatorLinAlg.go
    • Line 346: warning: cyclomatic complexity 17 of function batchedMatMulDiff() is high (> 15) (gocyclo)
    • Line 104: warning: cyclomatic complexity 17 of function matMulDiff() is high (> 15) (gocyclo)
    • Line 51: warning: cyclomatic complexity 17 of function matMulDiffExpr() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 17 of function batchedMatMulDiffExpr() is high (> 15) (gocyclo)
    • operatorPointwise_unary_gen.go
    • Line 5: warning: cyclomatic complexity 21 of function (*sf32UnaryOperator).unaryOpType() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 21 of function (*sf64UnaryOperator).unaryOpType() is high (> 15) (gocyclo)
    • vm_genera.go
    • Line 296: warning: cyclomatic complexity 46 of function (*lispMachine).forward() is high (> 15) (gocyclo)
    • Line 565: warning: cyclomatic complexity 16 of function (*lispMachine).watchedLogf() is high (> 15) (gocyclo)
    • vm_tape_cuda.go
    • Line 66: warning: cyclomatic complexity 30 of function (*execOp).exec() is high (> 15) (gocyclo)
    • op_yolo.go
    • Line 151: warning: cyclomatic complexity 28 of function (*yoloOp).Do() is high (> 15) (gocyclo)
    • Line 515: warning: cyclomatic complexity 22 of function (*yoloOp).evaluateYOLO_f64() is high (> 15) (gocyclo)
    • Line 294: warning: cyclomatic complexity 22 of function (*yoloOp).evaluateYOLO_f32() is high (> 15) (gocyclo)
    • examples/resnet/main.go
    • Line 88: warning: cyclomatic complexity 26 of function (*convnet).fwd() is high (> 15) (gocyclo)
    • Line 222: warning: cyclomatic complexity 16 of function main() is high (> 15) (gocyclo)
    • execution.go
    • Line 81: warning: cyclomatic complexity 23 of function (*ExternalOp).Do() is high (> 15) (gocyclo)
    • operations_test.go
    • Line 752: warning: cyclomatic complexity 23 of function TestTensordot() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 21 of function TestSum() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 19 of function TestMul() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 18 of function TestGt() is high (> 15) (gocyclo)
    • Line 482: warning: cyclomatic complexity 17 of function TestSlice() is high (> 15) (gocyclo)
    • cuda/bfc.go
    • Line 113: warning: cyclomatic complexity 23 of function (*freelist).insert() is high (> 15) (gocyclo)
    • op_math_cuda.go
    • Line 182: warning: cyclomatic complexity 16 of function (linAlgBinOp).CUDADo() is high (> 15) (gocyclo)
    • vm_tape.go
    • Line 251: warning: cyclomatic complexity 21 of function (*tapeMachine).runall() is high (> 15) (gocyclo)
    • op_types.go
    • Line 94: warning: cyclomatic complexity 21 of function (*dtConvOp).UsePreallocDo() is high (> 15) (gocyclo)
    • op_tensor.go
    • Line 262: warning: cyclomatic complexity 19 of function (repeatOp).DoDiff() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 16 of function (repeatOp).UsePreallocDo() is high (> 15) (gocyclo)
    • op_nn.go
    • Line 80: warning: cyclomatic complexity 18 of function (randomOp).Do() is high (> 15) (gocyclo)
    • Line 1976: warning: cyclomatic complexity 17 of function (*globalAveragePoolOp).Do() is high (> 15) (gocyclo)
    • graph.go
    • Line 323: warning: cyclomatic complexity 31 of function (*ExprGraph).ToDot() is high (> 15) (gocyclo)
    • Line 627: warning: cyclomatic complexity 16 of function (*ExprGraph).subgraph() is high (> 15) (gocyclo)
    • compile.go
    • Line 347: warning: cyclomatic complexity 28 of function (*codegenerator).addNode() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 17 of function (*codegenerator).addInstr() is high (> 15) (gocyclo)
    • Line 503: warning: cyclomatic complexity 16 of function (*codegenerator).insertFree() is high (> 15) (gocyclo)
    • op_math.go
    • Line 1097: warning: cyclomatic complexity 28 of function (tensordotOp).SymDiff() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 27 of function (tensordotOp).DoDiff() is high (> 15) (gocyclo)
    • Line 137: warning: cyclomatic complexity 22 of function (elemBinOp).InferShape() is high (> 15) (gocyclo)
    • Line 544: warning: cyclomatic complexity 21 of function (linAlgBinOp).InferShape() is high (> 15) (gocyclo)
    • op_reduction.go
    • Line 257: warning: cyclomatic complexity 16 of function (sumOp).DoDiff() 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