Preparing report...

Report for github.com/Harold2017/golina

A+    Excellent!    Found 27 issues across 67 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!


golint68%

Golint is a linter for Go source code.

    • golina/spatial/normalEstimation.go
    • Line 10: warning: comment on exported function PlanePcaEigen should be of the form "PlanePcaEigen ..." (golint)
    • Line 26: warning: comment on exported function PlanePcaSVD should be of the form "PlanePcaSVD ..." (golint)
    • Line 39: warning: comment on exported function PlaneLinearSolveWeighted should be of the form "PlaneLinearSolveWeighted ..." (golint)
    • Line 95: warning: don't use underscores in Go names; var axis_dir should be axisDir (golint)
    • golina/mesh/grid.go
    • Line 8: warning: exported type Grid should have comment or be unexported (golint)
    • Line 18: warning: exported function NewGrid should have comment or be unexported (golint)
    • Line 51: warning: exported type PointsWithVoxelID should have comment or be unexported (golint)
    • Line 60: warning: comment on exported method Grid.ConvertXYZToVoxelID should be of the form "ConvertXYZToVoxelID ..." (golint)
    • Line 76: warning: exported method Grid.ConvertVoxelIDToGridCoord should have comment or be unexported (golint)
    • golina/mesh/normalEst.go
    • Line 11: warning: exported type NormalEst should have comment or be unexported (golint)
    • Line 22: warning: exported function NewNormalEst should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method NormalEst.GetNeighbors should be of the form "GetNeighbors ..." (golint)
    • Line 67: warning: comment on exported method NormalEst.IsVoxelContainsEdgePoints should be of the form "IsVoxelContainsEdgePoints ..." (golint)
    • Line 98: warning: comment on exported method NormalEst.Voxelization should be of the form "Voxelization ..." (golint)
    • Line 101: warning: don't use underscores in Go names; range var voxel_id should be voxelID (golint)
    • Line 109: warning: don't use underscores in Go names; range var voxel_id should be voxelID (golint)
    • Line 109: warning: don't use underscores in Go names; range var idx_array should be idxArray (golint)
    • Line 118: warning: comment on exported method NormalEst.FindValidVoxel should be of the form "FindValidVoxel ..." (golint)
    • Line 133: warning: comment on exported method NormalEst.ComputeVoxelPlaneInfo should be of the form "ComputeVoxelPlaneInfo ..." (golint)
    • Line 142: warning: comment on exported method NormalEst.AlignVoxelNormal should be of the form "AlignVoxelNormal ..." (golint)
    • Line 170: warning: comment on exported method NormalEst.FindGoodVoxel should be of the form "FindGoodVoxel ..." (golint)
    • Line 181: warning: comment on exported method NormalEst.GetPointNormals should be of the form "GetPointNormals ..." (golint)
    • Line 222: warning: comment on exported function NormalEstProcess should be of the form "NormalEstProcess ..." (golint)
    • golina/numerical/numerical.go
    • Line 3: warning: exported type FloatFunc should have comment or be unexported (golint)
    • Line 5: warning: comment on exported function FuncFirstOrderDiff should be of the form "FuncFirstOrderDiff ..." (golint)
    • Line 15: warning: comment on exported function GetGaussianQuadraturePointWeight should be of the form "GetGaussianQuadraturePointWeight ..." (golint)
    • Line 39: warning: comment on exported function ChangeInterval should be of the form "ChangeInterval ..." (golint)
    • Line 46: warning: comment on exported function GaussianQuadrature should be of the form "GaussianQuadrature ..." (golint)
    • golina/stats/CCA.go
    • Line 8: warning: comment on exported function CanonicalCorrelation should be of the form "CanonicalCorrelation ..." (golint)
    • golina/spatial/distance.go
    • Line 8: warning: exported function PointToPointDistance should have comment or be unexported (golint)
    • Line 12: warning: exported function PointToLineDistance should have comment or be unexported (golint)
    • Line 16: warning: exported function PointToPlaneDistance should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type HausdorffDistance should be of the form "HausdorffDistance ..." (with optional leading article) (golint)
    • Line 26: warning: exported function DirectedHausdorffDistance should have comment or be unexported (golint)
    • Line 66: warning: exported function DirectedHausdorffDistanceBasedOnKNN should have comment or be unexported (golint)
    • Line 94: warning: comment on exported function TaxicabDistance should be of the form "TaxicabDistance ..." (golint)
    • Line 105: warning: exported function SquaredEuclideanDistance should have comment or be unexported (golint)
    • Line 109: warning: comment on exported function MinkowskiDistance should be of the form "MinkowskiDistance ..." (golint)
    • Line 119: warning: comment on exported function ChebyshevDistance should be of the form "ChebyshevDistance ..." (golint)
    • Line 145: warning: comment on exported function CanberraDistance should be of the form "CanberraDistance ..." (golint)
    • golina/spatial/kNearestNeighbors.go
    • Line 8: warning: comment on exported function KNearestNeighbors should be of the form "KNearestNeighbors ..." (golint)
    • Line 26: warning: exported function KNearestNeighborsWithDistance should have comment or be unexported (golint)
    • golina/spatial/kdtree.go
    • Line 10: warning: exported type KDTree should have comment or be unexported (golint)
    • Line 15: warning: exported type Node should have comment or be unexported (golint)
    • Line 20: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 46: warning: exported method Node.Insert should have comment or be unexported (golint)
    • Line 50: warning: exported method KDTree.Insert should have comment or be unexported (golint)
    • Line 87: warning: exported method KDTree.Search should have comment or be unexported (golint)
    • Line 109: warning: exported method KDTree.FindMinValue should have comment or be unexported (golint)
    • Line 138: warning: exported method KDTree.FindMinNode should have comment or be unexported (golint)
    • Line 169: warning: exported method KDTree.DeleteNode should have comment or be unexported (golint)
    • golina/doc.go
    • Line 1: warning: package comment should be of the form "Package golina ..." (golint)
    • golina/stats/PCA.go
    • Line 5: warning: comment on exported function PrincipalComponents should be of the form "PrincipalComponents ..." (golint)
    • golina/mesh/triangle.go
    • Line 12: warning: exported type Vertex should have comment or be unexported (golint)
    • Line 18: warning: exported function NewVertex should have comment or be unexported (golint)
    • Line 27: warning: exported function VertexEqual should have comment or be unexported (golint)
    • Line 31: warning: exported type Triangle should have comment or be unexported (golint)
    • Line 39: warning: exported function NewTriangle should have comment or be unexported (golint)
    • Line 48: warning: exported method Triangle.IsCoincidentWith should have comment or be unexported (golint)
    • Line 52: warning: exported method Triangle.AssignNeighbors should have comment or be unexported (golint)
    • Line 60: warning: comment on exported type DelaunayTriangle should be of the form "DelaunayTriangle ..." (with optional leading article) (golint)
    • Line 69: warning: exported function NewDelaunayTriangle should have comment or be unexported (golint)
    • Line 90: warning: exported method DelaunayTriangle.ProjectPointsToUnitSphere should have comment or be unexported (golint)
    • Line 97: warning: comment on exported method DelaunayTriangle.BuildInitialHull should be of the form "BuildInitialHull ..." (golint)
    • Line 155: warning: exported method DelaunayTriangle.InsertPoint should have comment or be unexported (golint)
    • Line 189: warning: exported method DelaunayTriangle.RemoveExtraTriangles should have comment or be unexported (golint)
    • Line 211: warning: exported method DelaunayTriangle.SplitTriangle should have comment or be unexported (golint)
    • Line 236: warning: exported method DelaunayTriangle.FixNeighborhood should have comment or be unexported (golint)
    • Line 245: warning: exported method DelaunayTriangle.DoLocalOptimization should have comment or be unexported (golint)
    • Line 264: warning: exported method DelaunayTriangle.TrySwapDiagonal should have comment or be unexported (golint)
    • Line 291: warning: exported method DelaunayTriangle.GetDistance should have comment or be unexported (golint)
    • Line 295: warning: exported method DelaunayTriangle.GetDetPoints should have comment or be unexported (golint)
    • Line 299: warning: exported method DelaunayTriangle.GetDetMatrix should have comment or be unexported (golint)
    • Line 303: warning: comment on exported method DelaunayTriangle.WriteVertexIDToTxt should be of the form "WriteVertexIDToTxt ..." (golint)
    • golina/cluster/kMeans.go
    • Line 9: warning: exported type ObservationWithClusterID should have comment or be unexported (golint)
    • Line 14: warning: exported type ClusteredObservationSet should have comment or be unexported (golint)
    • Line 16: warning: exported type DistFunc should have comment or be unexported (golint)
    • Line 39: warning: exported function RandomMeans should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function KMeans should be of the form "KMeans ..." (golint)
    • Line 94: warning: comment on exported function KMeansPP should be of the form "KMeansPP ..." (golint)
    • Line 107: warning: exported function PPMeans should have comment or be unexported (golint)
    • golina/stats/ICA.go
    • Line 9: warning: comment on exported function FastICA should be of the form "FastICA ..." (golint)
    • Line 50: warning: comment on exported function PreWhitening should be of the form "PreWhitening ..." (golint)
    • Line 67: warning: exported function CalW should have comment or be unexported (golint)
    • Line 101: warning: comment on exported function FuncLogcosh should be of the form "FuncLogcosh ..." (golint)
    • Line 122: warning: comment on exported function FuncExp should be of the form "FuncExp ..." (golint)
    • golina/spatial/octree.go
    • Line 9: warning: comment on exported type Octree should be of the form "Octree ..." (with optional leading article) (golint)
    • Line 14: warning: exported method Octree.GetParentNode should have comment or be unexported (golint)
    • Line 18: warning: exported method Octree.LookupNode should have comment or be unexported (golint)
    • Line 22: warning: exported method Octree.GetNodeTreeDepth should have comment or be unexported (golint)
    • Line 28: warning: comment on exported method Octree.Transverse should be of the form "Transverse ..." (golint)
    • Line 42: warning: exported type OctreeNode should have comment or be unexported (golint)
    • golina/mesh/initVar.go
    • Line 21: warning: comment on exported function GetInitVarNormalEst should be of the form "GetInitVarNormalEst ..." (golint)
    • Line 114: warning: exported function GetInitVarTriangulation should have comment or be unexported (golint)
    • golina/stats/distance.go
    • Line 8: warning: comment on exported function MahalanobisDistance should be of the form "MahalanobisDistance ..." (golint)
    • Line 25: warning: comment on exported function MahalanobisDistanceXYVI should be of the form "MahalanobisDistanceXYVI ..." (golint)
    • golina/stats/stats.go
    • Line 9: warning: comment on exported function LinearKernel should be of the form "LinearKernel ..." (golint)
    • Line 14: warning: exported function PolyKernel should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function RBFKernel should be of the form "RBFKernel ..." (golint)
    • Line 23: warning: exported function SigmoidKernel should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function Mode should be of the form "Mode ..." (golint)
    • Line 59: warning: exported function Variance should have comment or be unexported (golint)
    • Line 63: warning: exported function StandardDeviation should have comment or be unexported (golint)
    • Line 67: warning: comment on exported function StandardScore should be of the form "StandardScore ..." (golint)
    • Line 73: warning: exported function StandardError should have comment or be unexported (golint)
    • Line 77: warning: comment on exported function CoefficientOfVariance should be of the form "CoefficientOfVariance ..." (golint)
    • Line 83: warning: comment on exported function Covariance should be of the form "Covariance ..." (golint)
    • Line 93: warning: comment on exported function CorrelationCoefficient should be of the form "CorrelationCoefficient ..." (golint)
    • Line 104: warning: comment on exported function GetBinNum should be of the form "GetBinNum ..." (golint)
    • Line 124: warning: exported function GetEqualBinWidth should have comment or be unexported (golint)
    • Line 130: warning: comment on exported function Histogram should be of the form "Histogram ..." (golint)
    • golina/mesh/point.go
    • Line 9: warning: exported type Point should have comment or be unexported (golint)
    • Line 13: warning: exported function NewPoint should have comment or be unexported (golint)
    • Line 19: warning: exported function PEqual should have comment or be unexported (golint)
    • Line 27: warning: exported type Points should have comment or be unexported (golint)
    • Line 31: warning: exported function NewPoints should have comment or be unexported (golint)
    • Line 39: warning: exported method Points.MaxXYZ should have comment or be unexported (golint)
    • Line 46: warning: exported method Points.MinXYZ should have comment or be unexported (golint)
    • Line 53: warning: exported method Points.PointsNum should have comment or be unexported (golint)
    • golina/mesh/voxel.go
    • Line 9: warning: exported type Voxel should have comment or be unexported (golint)
    • Line 22: warning: exported function NewVoxel should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method Voxel.AddPoints should be of the form "AddPoints ..." (golint)
    • Line 36: warning: comment on exported method Voxel.ComputePlane should be of the form "ComputePlane ..." (golint)
    • Line 46: warning: exported method Voxel.ComputeNormalSimilarity should have comment or be unexported (golint)

gocyclo97%

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.

    • golina/matrix/EigenDecomposition.go
    • Line 381: warning: cyclomatic complexity 73 of function hqr2() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 23 of function tred2() is high (> 15) (gocyclo)
    • Line 287: warning: cyclomatic complexity 21 of function orthes() is high (> 15) (gocyclo)
    • Line 171: warning: cyclomatic complexity 17 of function tql2() is high (> 15) (gocyclo)

ineffassign89%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words