Preparing report...

Report for github.com/go-lpc/mim

A+    Excellent!    Found 25 issues across 61 files

Tweet

gofmt98%

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!


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.

    • mim/eda/device.go
    • Line 888: warning: cyclomatic complexity 26 of function (*Device).loopNoise() is high (> 15) (gocyclo)
    • Line 785: warning: cyclomatic complexity 22 of function (*Device).loopDCC() is high (> 15) (gocyclo)
    • Line 409: warning: cyclomatic complexity 16 of function (*Device).initHRFromDB() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 16 of function (*Device).initFPGA() is high (> 15) (gocyclo)
    • mim/eda/pio.go
    • Line 1048: warning: cyclomatic complexity 17 of function (*Device).hrscReadConfHRs() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 16 of function (*Device).readPreAmpGain() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 16 of function (*Device).readMask() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • mim/conddb/conddb.go
    • Line 15: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 67: warning: exported method DB.Close should have comment or be unexported (golint)
    • Line 71: warning: exported method DB.QueryContext should have comment or be unexported (golint)
    • Line 75: warning: exported method DB.LastHRConfig should have comment or be unexported (golint)
    • Line 107: warning: exported method DB.LastDetectorID should have comment or be unexported (golint)
    • Line 139: warning: exported method DB.ASICConfig should have comment or be unexported (golint)
    • Line 204: warning: exported method DB.DAQStates should have comment or be unexported (golint)
    • mim/eda/cfg.go
    • Line 15: warning: exported type Option should have comment or be unexported (golint)
    • Line 17: warning: exported function WithThreshold should have comment or be unexported (golint)
    • Line 23: warning: exported function WithRFMMask should have comment or be unexported (golint)
    • Line 29: warning: exported function WithRShaper should have comment or be unexported (golint)
    • Line 35: warning: exported function WithCShaper should have comment or be unexported (golint)
    • Line 41: warning: exported function WithDevSHM should have comment or be unexported (golint)
    • Line 47: warning: exported function WithCtlAddr should have comment or be unexported (golint)
    • Line 53: warning: exported function WithConfigDir should have comment or be unexported (golint)
    • Line 66: warning: exported function WithDAQMode should have comment or be unexported (golint)
    • Line 72: warning: exported function WithResetBCID should have comment or be unexported (golint)
    • mim/internal/xbuild/xbuild.go
    • Line 22: warning: exported const ImageName should have comment or be unexported (golint)
    • Line 24: warning: exported function Docker should have comment or be unexported (golint)
    • Line 87: warning: exported function HasDocker should have comment or be unexported (golint)
    • Line 94: warning: exported function HasDockerImage should have comment or be unexported (golint)
    • mim/internal/fakedb/fakedb.go
    • Line 21: warning: exported function Run should have comment or be unexported (golint)
    • Line 33: warning: exported type Driver should have comment or be unexported (golint)
    • Line 48: warning: exported type Conn should have comment or be unexported (golint)
    • Line 77: warning: exported type Stmt should have comment or be unexported (golint)
    • Line 119: warning: exported type StmtQueryContext should have comment or be unexported (golint)
    • Line 121: warning: exported method StmtQueryContext.QueryContext should have comment or be unexported (golint)
    • Line 125: warning: exported type Rows should have comment or be unexported (golint)
    • mim/conddb/daqstate.go
    • Line 7: warning: exported type DAQState should have comment or be unexported (golint)
    • Line 14: warning: exported type RFM should have comment or be unexported (golint)
    • mim/eda/internal/regs/regs.go
    • Line 9: warning: exported const NB_HR should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported const LW_H2F_BASE should be of the form "LW_H2F_BASE ..." (golint)
    • Line 20: warning: comment on exported const H2F_BASE should be of the form "H2F_BASE ..." (golint)
    • Line 25: warning: comment on exported const H2F_FIFO_DAQ_RFM0 should be of the form "H2F_FIFO_DAQ_RFM0 ..." (golint)
    • Line 69: warning: comment on exported const O_HR_TRANSMITON_0 should be of the form "O_HR_TRANSMITON_0 ..." (golint)
    • Line 102: warning: comment on exported const SHIFT_CMD_CODE_NOW should be of the form "SHIFT_CMD_CODE_NOW ..." (golint)
    • Line 106: warning: comment on exported const O_RESET should be of the form "O_RESET ..." (golint)
    • Line 137: warning: comment on exported const S_IDLE should be of the form "S_IDLE ..." (golint)
    • Line 148: warning: comment on exported const CMD_RESET_BCID should be of the form "CMD_RESET_BCID ..." (golint)
    • mim/cmd/eda-ctl/main.go
    • Line 169: warning: exported type Request should have comment or be unexported (golint)
    • Line 174: warning: exported type Reply should have comment or be unexported (golint)
    • mim/eda/device.go
    • Line 182: warning: exported function NewDevice should have comment or be unexported (golint)
    • Line 244: warning: exported method Device.Boot should have comment or be unexported (golint)
    • Line 262: warning: exported method Device.ConfigureDIF should have comment or be unexported (golint)
    • Line 276: warning: exported method Device.Configure should have comment or be unexported (golint)
    • Line 311: warning: exported method Device.Initialize should have comment or be unexported (golint)
    • Line 591: warning: exported method Device.Start should have comment or be unexported (golint)
    • Line 1008: warning: exported method Device.Stop should have comment or be unexported (golint)
    • Line 1058: warning: exported method Device.Close should have comment or be unexported (golint)
    • Line 1088: warning: exported method Device.DumpFIFOStatus should have comment or be unexported (golint)
    • Line 1148: warning: exported method Device.DumpCounters should have comment or be unexported (golint)
    • Line 1185: warning: exported method Device.DumpConfig should have comment or be unexported (golint)
    • Line 1201: warning: exported method Device.DumpRegisters should have comment or be unexported (golint)
    • mim/internal/eformat/eformat.go
    • Line 30: warning: exported type GlobalHeader should have comment or be unexported (golint)
    • Line 39: warning: exported type Frame should have comment or be unexported (golint)
    • Line 45: warning: exported type File should have comment or be unexported (golint)
    • Line 50: warning: exported type SCHeader should have comment or be unexported (golint)
    • mim/internal/mmap/mmap.go
    • Line 21: warning: exported type Handle should have comment or be unexported (golint)
    • Line 25: warning: exported function HandleFrom should have comment or be unexported (golint)
    • mim/conddb/asic.go
    • Line 17: warning: exported type ASIC should have comment or be unexported (golint)
    • Line 58: warning: exported method ASIC.HRConfig should have comment or be unexported (golint)
    • Line 79: warning: exported method ASIC.FromHRConfig should have comment or be unexported (golint)

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!