Preparing report...

Report for github.com/hybridgroup/gocv

A+    Excellent!    Found 26 issues across 100 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!


gocyclo94%

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.

    • gocv/imgproc_test.go
    • Line 948: warning: cyclomatic complexity 21 of function TestHoughLinesPWithParams() is high (> 15) (gocyclo)
    • Line 910: warning: cyclomatic complexity 21 of function TestHoughLinesP() is high (> 15) (gocyclo)
    • Line 986: warning: cyclomatic complexity 17 of function TestHoughLinesPointSet() is high (> 15) (gocyclo)
    • gocv/core_test.go
    • Line 22: warning: cyclomatic complexity 40 of function TestMatWithSizes() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 39 of function TestMatDataPtr() is high (> 15) (gocyclo)
    • Line 937: warning: cyclomatic complexity 26 of function TestMatMutators() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • gocv/calib3d.go
    • Line 125: warning: exported function Undistort should have comment or be unexported (golint)
    • Line 143: warning: comment on exported const CalibCBAdaptiveThresh should be of the form "CalibCBAdaptiveThresh ..." (golint)
    • Line 146: warning: comment on exported const CalibCBNormalizeImage should be of the form "CalibCBNormalizeImage ..." (golint)
    • Line 148: warning: comment on exported const CalibCBFilterQuads should be of the form "CalibCBFilterQuads ..." (golint)
    • Line 150: warning: comment on exported const CalibCBFastCheck should be of the form "CalibCBFastCheck ..." (golint)
    • Line 152: warning: exported const CalibCBExhaustive should have comment (or a comment on this block) or be unexported (golint)
    • gocv/imgproc_colorcodes.go
    • Line 274: warning: exported const ColorYUVToRGBYV12 should have comment (or a comment on this block) or be unexported (golint)
    • Line 286: warning: comment on exported const ColorYUVToRGBUYVY should be of the form "ColorYUVToRGBUYVY ..." (golint)
    • Line 306: warning: comment on exported const ColorRGBATomRGBA should be of the form "ColorRGBATomRGBA ..." (golint)
    • Line 310: warning: comment on exported const ColorRGBToYUVI420 should be of the form "ColorRGBToYUVI420 ..." (golint)
    • Line 321: warning: comment on exported const ColorBayerBGToBGR should be of the form "ColorBayerBGToBGR ..." (golint)
    • Line 332: warning: comment on exported const ColorBayerBGToBGRVNG should be of the form "ColorBayerBGToBGRVNG ..." (golint)
    • Line 338: warning: comment on exported const ColorBayerBGToBGREA should be of the form "ColorBayerBGToBGREA ..." (golint)
    • Line 344: warning: comment on exported const ColorBayerBGToBGRA should be of the form "ColorBayerBGToBGRA ..." (golint)
    • gocv/objdetect.go
    • Line 202: warning: exported function NewQRCodeDetector should have comment or be unexported (golint)
    • Line 206: warning: exported method QRCodeDetector.Close should have comment or be unexported (golint)
    • Line 218: warning: don't use underscores in Go names; method parameter straight_qrcode should be straightQrcode (golint)
    • Line 238: warning: don't use underscores in Go names; method parameter straight_qrcode should be straightQrcode (golint)
    • Line 243: warning: comment on exported method QRCodeDetector.DetectMulti should be of the form "DetectMulti ..." (golint)
    • Line 255: warning: comment on exported method QRCodeDetector.DetectAndDecodeMulti should be of the form "DetectAndDecodeMulti ..." (golint)
    • gocv/contrib/img_hash.go
    • Line 67: warning: exported type BlockMeanHashMode should have comment or be unexported (golint)
    • Line 70: warning: exported const BlockMeanHashMode0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 125: warning: exported function NewMarrHildrethHash should have comment or be unexported (golint)
    • Line 156: warning: exported function NewRadialVarianceHash should have comment or be unexported (golint)
    • gocv/features2d.go
    • Line 368: warning: comment on exported type SimpleBlobDetectorParams should be of the form "SimpleBlobDetectorParams ..." (with optional leading article) (golint)
    • Line 568: warning: comment on exported method SimpleBlobDetectorParams.GetMinRepeatability should be of the form "GetMinRepeatability ..." (golint)
    • Line 583: warning: comment on exported method SimpleBlobDetectorParams.SetThresholdStep should be of the form "SetThresholdStep ..." (golint)
    • Line 588: warning: comment on exported method SimpleBlobDetectorParams.GetThresholdStep should be of the form "GetThresholdStep ..." (golint)
    • gocv/videoio.go
    • Line 16: warning: comment on exported type VideoCaptureAPI should be of the form "VideoCaptureAPI ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported const VideoCaptureAny should be of the form "VideoCaptureAny ..." (golint)
    • Line 24: warning: comment on exported const VideoCaptureVFW should be of the form "VideoCaptureVFW ..." (golint)
    • Line 27: warning: comment on exported const VideoCaptureV4L should be of the form "VideoCaptureV4L ..." (golint)
    • Line 30: warning: comment on exported const VideoCaptureV4L2 should be of the form "VideoCaptureV4L2 ..." (golint)
    • Line 33: warning: comment on exported const VideoCaptureFirewire should be of the form "VideoCaptureFirewire ..." (golint)
    • Line 36: warning: comment on exported const VideoCaptureFireware should be of the form "VideoCaptureFireware ..." (golint)
    • Line 39: warning: comment on exported const VideoCaptureIEEE1394 should be of the form "VideoCaptureIEEE1394 ..." (golint)
    • Line 42: warning: comment on exported const VideoCaptureDC1394 should be of the form "VideoCaptureDC1394 ..." (golint)
    • Line 45: warning: comment on exported const VideoCaptureCMU1394 should be of the form "VideoCaptureCMU1394 ..." (golint)
    • Line 48: warning: comment on exported const VideoCaptureQT should be of the form "VideoCaptureQT ..." (golint)
    • Line 51: warning: comment on exported const VideoCaptureUnicap should be of the form "VideoCaptureUnicap ..." (golint)
    • Line 54: warning: comment on exported const VideoCaptureDshow should be of the form "VideoCaptureDshow ..." (golint)
    • Line 57: warning: comment on exported const VideoCapturePvAPI should be of the form "VideoCapturePvAPI ..." (golint)
    • Line 60: warning: comment on exported const VideoCaptureOpenNI should be of the form "VideoCaptureOpenNI ..." (golint)
    • Line 63: warning: comment on exported const VideoCaptureOpenNIAsus should be of the form "VideoCaptureOpenNIAsus ..." (golint)
    • Line 66: warning: comment on exported const VideoCaptureAndroid should be of the form "VideoCaptureAndroid ..." (golint)
    • Line 69: warning: comment on exported const VideoCaptureXiAPI should be of the form "VideoCaptureXiAPI ..." (golint)
    • Line 72: warning: comment on exported const VideoCaptureAVFoundation should be of the form "VideoCaptureAVFoundation ..." (golint)
    • Line 75: warning: comment on exported const VideoCaptureGiganetix should be of the form "VideoCaptureGiganetix ..." (golint)
    • Line 78: warning: comment on exported const VideoCaptureMSMF should be of the form "VideoCaptureMSMF ..." (golint)
    • Line 81: warning: comment on exported const VideoCaptureWinRT should be of the form "VideoCaptureWinRT ..." (golint)
    • Line 84: warning: comment on exported const VideoCaptureIntelPerc should be of the form "VideoCaptureIntelPerc ..." (golint)
    • Line 87: warning: comment on exported const VideoCaptureRealsense should be of the form "VideoCaptureRealsense ..." (golint)
    • Line 90: warning: comment on exported const VideoCaptureOpenNI2 should be of the form "VideoCaptureOpenNI2 ..." (golint)
    • Line 93: warning: comment on exported const VideoCaptureOpenNI2Asus should be of the form "VideoCaptureOpenNI2Asus ..." (golint)
    • Line 96: warning: comment on exported const VideoCaptureGPhoto2 should be of the form "VideoCaptureGPhoto2 ..." (golint)
    • Line 99: warning: comment on exported const VideoCaptureGstreamer should be of the form "VideoCaptureGstreamer ..." (golint)
    • Line 102: warning: comment on exported const VideoCaptureFFmpeg should be of the form "VideoCaptureFFmpeg ..." (golint)
    • Line 105: warning: comment on exported const VideoCaptureImages should be of the form "VideoCaptureImages ..." (golint)
    • Line 108: warning: comment on exported const VideoCaptureAravis should be of the form "VideoCaptureAravis ..." (golint)
    • Line 111: warning: comment on exported const VideoCaptureOpencvMjpeg should be of the form "VideoCaptureOpencvMjpeg ..." (golint)
    • Line 114: warning: comment on exported const VideoCaptureIntelMFX should be of the form "VideoCaptureIntelMFX ..." (golint)
    • Line 117: warning: comment on exported const VideoCaptureXINE should be of the form "VideoCaptureXINE ..." (golint)
    • Line 309: warning: comment on exported function VideoCaptureFileWithAPI should be of the form "VideoCaptureFileWithAPI ..." (golint)
    • Line 336: warning: comment on exported function VideoCaptureDeviceWithAPI should be of the form "VideoCaptureDeviceWithAPI ..." (golint)
    • Line 491: warning: exported function OpenVideoCaptureWithAPI should have comment or be unexported (golint)
    • gocv/cuda/cuda.go
    • Line 88: warning: receiver name m should be consistent with previous receiver name g for GpuMat (golint)
    • gocv/cuda/imgproc.go
    • Line 16: warning: comment on exported type CannyEdgeDetector should be of the form "CannyEdgeDetector ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported method CannyEdgeDetector.GetAppertureSize should be of the form "GetAppertureSize ..." (golint)
    • Line 60: warning: comment on exported method CannyEdgeDetector.GetHighThreshold should be of the form "GetHighThreshold ..." (golint)
    • Line 69: warning: comment on exported method CannyEdgeDetector.GetL2Gradient should be of the form "GetL2Gradient ..." (golint)
    • Line 78: warning: comment on exported method CannyEdgeDetector.GetLowThreshold should be of the form "GetLowThreshold ..." (golint)
    • Line 87: warning: comment on exported method CannyEdgeDetector.SetAppertureSize should be of the form "SetAppertureSize ..." (golint)
    • Line 96: warning: comment on exported method CannyEdgeDetector.SetHighThreshold should be of the form "SetHighThreshold ..." (golint)
    • Line 105: warning: comment on exported method CannyEdgeDetector.SetL2Gradient should be of the form "SetL2Gradient ..." (golint)
    • Line 114: warning: comment on exported method CannyEdgeDetector.SetLowThreshold should be of the form "SetLowThreshold ..." (golint)
    • Line 134: warning: comment on exported type HoughLinesDetector should be of the form "HoughLinesDetector ..." (with optional leading article) (golint)
    • Line 169: warning: comment on exported type HoughSegmentDetector should be of the form "HoughSegmentDetector ..." (with optional leading article) (golint)
    • gocv/core.go
    • Line 164: warning: exported type Point2f should have comment or be unexported (golint)
    • Line 169: warning: exported var ErrEmptyByteSlice should have comment or be unexported (golint)
    • Line 230: warning: comment on exported function NewMatWithSizesFromBytes should be of the form "NewMatWithSizesFromBytes ..." (golint)
    • Line 292: warning: comment on exported function Eye should be of the form "Eye ..." (golint)
    • Line 301: warning: comment on exported function Zeros should be of the form "Zeros ..." (golint)
    • Line 310: warning: comment on exported function Ones should be of the form "Ones ..." (golint)
    • Line 379: warning: exported method Mat.ConvertToWithParams should have comment or be unexported (golint)
    • Line 1514: warning: comment on exported function MixChannels should be of the form "MixChannels ..." (golint)
    • Line 1555: warning: comment on exported function MulSpectrums should be of the form "MulSpectrums ..." (golint)
    • Line 1638: warning: comment on exported function NormWithMats should be of the form "NormWithMats ..." (golint)
    • Line 1675: warning: exported type SolveDecompositionFlags should have comment or be unexported (golint)
    • Line 1678: warning: comment on exported const SolveDecompositionLu should be of the form "SolveDecompositionLu ..." (golint)
    • Line 1681: warning: comment on exported const SolveDecompositionSvd should be of the form "SolveDecompositionSvd ..." (golint)
    • Line 1684: warning: comment on exported const SolveDecompositionEing should be of the form "SolveDecompositionEing ..." (golint)
    • Line 1687: warning: comment on exported const SolveDecompositionCholesky should be of the form "SolveDecompositionCholesky ..." (golint)
    • Line 1690: warning: comment on exported const SolveDecompositionQr should be of the form "SolveDecompositionQr ..." (golint)
    • Line 1693: warning: comment on exported const SolveDecompositionNormal should be of the form "SolveDecompositionNormal ..." (golint)
    • Line 1726: warning: exported type ReduceTypes should have comment or be unexported (golint)
    • Line 1729: warning: comment on exported const ReduceSum should be of the form "ReduceSum ..." (golint)
    • Line 1732: warning: comment on exported const ReduceAvg should be of the form "ReduceAvg ..." (golint)
    • Line 1735: warning: comment on exported const ReduceMax should be of the form "ReduceMax ..." (golint)
    • Line 1738: warning: comment on exported const ReduceMin should be of the form "ReduceMin ..." (golint)
    • Line 1760: warning: comment on exported function ScaleAdd should be of the form "ScaleAdd ..." (golint)
    • Line 1777: warning: exported type SortFlags should have comment or be unexported (golint)
    • Line 1780: warning: comment on exported const SortEveryRow should be of the form "SortEveryRow ..." (golint)
    • Line 1783: warning: comment on exported const SortEveryColumn should be of the form "SortEveryColumn ..." (golint)
    • Line 1786: warning: comment on exported const SortAscending should be of the form "SortAscending ..." (golint)
    • Line 1789: warning: comment on exported const SortDescending should be of the form "SortDescending ..." (golint)
    • Line 1876: warning: comment on exported function PolarToCart should be of the form "PolarToCart ..." (golint)
    • Line 2405: warning: exported type RNGDistType should have comment or be unexported (golint)
    • Line 2408: warning: comment on exported const RNGDistUniform should be of the form "RNGDistUniform ..." (golint)
    • Line 2410: warning: comment on exported const RNGDistNormal should be of the form "RNGDistNormal ..." (golint)
    • Line 2425: warning: comment on exported function SetRNGSeed should be of the form "SetRNGSeed ..." (golint)
    • gocv/cuda/filters.go
    • Line 17: warning: comment on exported type GaussianFilter should be of the form "GaussianFilter ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported type SobelFilter should be of the form "SobelFilter ..." (with optional leading article) (golint)
    • gocv/cuda/objdetect.go
    • Line 21: warning: exported type DescriptorStorageFormat should have comment or be unexported (golint)
    • Line 24: warning: exported const DESCR_FORMAT_COL_BY_COL should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported type CascadeClassifier should be of the form "CascadeClassifier ..." (with optional leading article) (golint)
    • Line 38: warning: comment on exported function NewCascadeClassifier should be of the form "NewCascadeClassifier ..." (golint)
    • Line 67: warning: comment on exported function CreateHOG should be of the form "CreateHOG ..." (golint)
    • Line 72: warning: exported function CreateHOGWithParams should have comment or be unexported (golint)
    • Line 137: warning: comment on exported method HOG.GetDescriptorFormat should be of the form "GetDescriptorFormat ..." (golint)
    • Line 155: warning: comment on exported method HOG.GetDescriptorSize should be of the form "GetDescriptorSize ..." (golint)
    • Line 164: warning: comment on exported method HOG.GetGammaCorrection should be of the form "GetGammaCorrection ..." (golint)
    • Line 173: warning: comment on exported method HOG.GetGroupThreshold should be of the form "GetGroupThreshold ..." (golint)
    • Line 182: warning: comment on exported method HOG.GetHitThreshold should be of the form "GetHitThreshold ..." (golint)
    • Line 191: warning: comment on exported method HOG.GetL2HysThreshold should be of the form "GetL2HysThreshold ..." (golint)
    • Line 200: warning: comment on exported method HOG.GetNumLevels should be of the form "GetNumLevels ..." (golint)
    • Line 209: warning: comment on exported method HOG.GetScaleFactor should be of the form "GetScaleFactor ..." (golint)
    • Line 218: warning: comment on exported method HOG.GetWinSigma should be of the form "GetWinSigma ..." (golint)
    • Line 227: warning: comment on exported method HOG.GetWinStride should be of the form "GetWinStride ..." (golint)
    • Line 237: warning: comment on exported method HOG.SetDescriptorFormat should be of the form "SetDescriptorFormat ..." (golint)
    • Line 246: warning: comment on exported method HOG.SetGammaCorrection should be of the form "SetGammaCorrection ..." (golint)
    • Line 255: warning: comment on exported method HOG.SetGroupThreshold should be of the form "SetGroupThreshold ..." (golint)
    • Line 264: warning: comment on exported method HOG.SetHitThreshold should be of the form "SetHitThreshold ..." (golint)
    • Line 273: warning: comment on exported method HOG.SetL2HysThreshold should be of the form "SetL2HysThreshold ..." (golint)
    • Line 282: warning: comment on exported method HOG.SetNumLevels should be of the form "SetNumLevels ..." (golint)
    • Line 291: warning: comment on exported method HOG.SetScaleFactor should be of the form "SetScaleFactor ..." (golint)
    • Line 300: warning: comment on exported method HOG.SetWinSigma should be of the form "SetWinSigma ..." (golint)
    • Line 309: warning: comment on exported method HOG.SetWinStride should be of the form "SetWinStride ..." (golint)
    • gocv/highgui.go
    • Line 236: warning: comment on exported function SelectROI should be of the form "SelectROI ..." (golint)
    • Line 246: warning: comment on exported function SelectROIs should be of the form "SelectROIs ..." (golint)
    • gocv/imgproc.go
    • Line 437: warning: exported type RotatedRect should have comment or be unexported (golint)
    • Line 542: warning: comment on exported const CCL_WU should be of the form "CCL_WU ..." (golint)
    • Line 545: warning: comment on exported const CCL_DEFAULT should be of the form "CCL_DEFAULT ..." (golint)
    • Line 548: warning: comment on exported const CCL_GRANA should be of the form "CCL_GRANA ..." (golint)
    • Line 561: warning: comment on exported function ConnectedComponentsWithParams should be of the form "ConnectedComponentsWithParams ..." (golint)
    • Line 575: warning: comment on exported const CC_STAT_LEFT should be of the form "CC_STAT_LEFT ..." (golint)
    • Line 578: warning: comment on exported const CC_STAT_TOP should be of the form "CC_STAT_TOP ..." (golint)
    • Line 581: warning: comment on exported const CC_STAT_WIDTH should be of the form "CC_STAT_WIDTH ..." (golint)
    • Line 584: warning: comment on exported const CC_STAT_HEIGHT should be of the form "CC_STAT_HEIGHT ..." (golint)
    • Line 587: warning: comment on exported const CC_STAT_AREA should be of the form "CC_STAT_AREA ..." (golint)
    • Line 590: warning: exported const CC_STAT_MAX should have comment (or a comment on this block) or be unexported (golint)
    • Line 604: warning: comment on exported function ConnectedComponentsWithStatsWithParams should be of the form "ConnectedComponentsWithStatsWithParams ..." (golint)
    • Line 707: warning: comment on exported function MorphologyDefaultBorderValue should be of the form "MorphologyDefaultBorderValue ..." (golint)
    • Line 971: warning: comment on exported function GrabCut should be of the form "GrabCut ..." (golint)
    • Line 1048: warning: exported function HoughLinesPWithParams should have comment or be unexported (golint)
    • Line 1627: warning: exported type HomographyMethod should have comment or be unexported (golint)
    • Line 1630: warning: exported const HomograpyMethodAllPoints should have comment (or a comment on this block) or be unexported (golint)
    • Line 1729: warning: exported const DistUser should have comment (or a comment on this block) or be unexported (golint)
    • Line 1791: warning: exported function InvertAffineTransform should have comment or be unexported (golint)
    • Line 1795: warning: comment on exported function PhaseCorrelate should be of the form "PhaseCorrelate ..." (golint)
    • Line 1878: warning: comment on exported method Mat.ToImageYUVWithParams should be of the form "ToImageYUVWithParams ..." (golint)
    • Line 2007: warning: exported function Accumulate should have comment or be unexported (golint)
    • Line 2011: warning: comment on exported function AccumulateWithMask should be of the form "AccumulateWithMask ..." (golint)
    • Line 2020: warning: comment on exported function AccumulateSquare should be of the form "AccumulateSquare ..." (golint)
    • Line 2029: warning: comment on exported function AccumulateSquareWithMask should be of the form "AccumulateSquareWithMask ..." (golint)
    • Line 2038: warning: comment on exported function AccumulateProduct should be of the form "AccumulateProduct ..." (golint)
    • Line 2047: warning: comment on exported function AccumulateProductWithMask should be of the form "AccumulateProductWithMask ..." (golint)
    • Line 2056: warning: comment on exported function AccumulatedWeighted should be of the form "AccumulatedWeighted ..." (golint)
    • Line 2065: warning: comment on exported function AccumulatedWeightedWithMask should be of the form "AccumulatedWeightedWithMask ..." (golint)
    • gocv/photo.go
    • Line 29: warning: don't use underscores in Go names; func parameter red_mul should be redMul (golint)
    • Line 29: warning: don't use underscores in Go names; func parameter green_mul should be greenMul (golint)
    • Line 29: warning: don't use underscores in Go names; func parameter blue_mul should be blueMul (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 3)