Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command
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!
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.
No problems detected. Good job!
Golint is a linter for Go source code.
-
gpushare-scheduler-extender/pkg/cache/deviceinfo.go
- Line 12: warning: exported type DeviceInfo should have comment or be unexported (golint)
- Line 20: warning: exported method DeviceInfo.GetPods should have comment or be unexported (golint)
- Line 37: warning: exported method DeviceInfo.GetTotalGPUMemory should have comment or be unexported (golint)
- Line 41: warning: exported method DeviceInfo.GetUsedGPUMemory should have comment or be unexported (golint)
-
gpushare-scheduler-extender/pkg/utils/node.go
- Line 5: warning: comment on exported function IsGPUSharingNode should be of the form "IsGPUSharingNode ..." (golint)
- Line 10: warning: comment on exported function GetTotalGPUMemory should be of the form "GetTotalGPUMemory ..." (golint)
- Line 21: warning: comment on exported function GetGPUCountInNode should be of the form "GetGPUCountInNode ..." (golint)
-
gpushare-scheduler-extender/pkg/cache/cache.go
- Line 14: warning: exported type SchedulerCache should have comment or be unexported (golint)
- Line 30: warning: exported function NewSchedulerCache should have comment or be unexported (golint)
- Line 40: warning: exported method SchedulerCache.GetNodeinfos should have comment or be unexported (golint)
- Line 48: warning: comment on exported method SchedulerCache.BuildCache should be of the form "BuildCache ..." (golint)
- Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 76: warning: exported method SchedulerCache.GetPod should have comment or be unexported (golint)
- Line 80: warning: comment on exported method SchedulerCache.KnownPod should be of the form "KnownPod ..." (golint)
- Line 89: warning: exported method SchedulerCache.AddOrUpdatePod should have comment or be unexported (golint)
- Line 115: warning: comment on exported method SchedulerCache.RemovePod should be of the form "RemovePod ..." (golint)
- Line 129: warning: comment on exported method SchedulerCache.GetNodeInfo should be of the form "GetNodeInfo ..." (golint)
-
gpushare-scheduler-extender/pkg/gpushare/controller.go
- Line 27: warning: exported var KeyFunc should have comment or be unexported (golint)
- Line 30: warning: exported type Controller should have comment or be unexported (golint)
- Line 62: warning: exported function NewController should have comment or be unexported (golint)
- Line 125: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 131: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 137: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 146: warning: exported method Controller.BuildCache should have comment or be unexported (golint)
- Line 150: warning: exported method Controller.GetSchedulerCache should have comment or be unexported (golint)
-
gpushare-scheduler-extender/pkg/utils/pod.go
- Line 157: warning: comment on exported function GetGPUMemoryFromContainerResource should be of the form "GetGPUMemoryFromContainerResource ..." (golint)
- Line 208: warning: exported function PatchPodAnnotationSpec should have comment or be unexported (golint)
-
gpushare-scheduler-extender/pkg/scheduler/gpushare-inspect.go
- Line 7: warning: exported function NewGPUShareInspect should have comment or be unexported (golint)
- Line 14: warning: exported type Result should have comment or be unexported (golint)
- Line 19: warning: exported type Node should have comment or be unexported (golint)
- Line 26: warning: exported type Device should have comment or be unexported (golint)
- Line 33: warning: exported type Pod should have comment or be unexported (golint)
- Line 39: warning: exported type Inspect should have comment or be unexported (golint)
-
gpushare-scheduler-extender/pkg/cache/nodeinfo.go
- Line 20: warning: exported const OptimisticLockErrorMsg should have comment (or a comment on this block) or be unexported (golint)
- Line 33: warning: comment on exported function NewNodeInfo should be of the form "NewNodeInfo ..." (golint)
- Line 58: warning: comment on exported method NodeInfo.Reset should be of the form "Reset ..." (golint)
- Line 81: warning: exported method NodeInfo.GetName should have comment or be unexported (golint)
- Line 85: warning: exported method NodeInfo.GetDevs should have comment or be unexported (golint)
- Line 93: warning: exported method NodeInfo.GetNode should have comment or be unexported (golint)
- Line 97: warning: exported method NodeInfo.GetTotalGPUMemory should have comment or be unexported (golint)
- Line 101: warning: exported method NodeInfo.GetGPUCount should have comment or be unexported (golint)
- Line 146: warning: comment on exported method NodeInfo.Assume should be of the form "Assume ..." (golint)
- Line 173: warning: exported method NodeInfo.Allocate should have comment or be unexported (golint)
- Line 306: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
-
gpushare-scheduler-extender/cmd/main.go
- Line 24: warning: exported const RecommendedKubeConfigPathEnv should have comment or be unexported (golint)
- Line 108: warning: exported function StringToLevel should have comment or be unexported (golint)
- Line 128: warning: exported function StringToInt should have comment or be unexported (golint)
-
gpushare-scheduler-extender/pkg/routes/routes.go
- Line 39: warning: exported function InspectRoute should have comment or be unexported (golint)
- Line 58: warning: exported function PredicateRoute should have comment or be unexported (golint)
- Line 101: warning: exported function BindRoute should have comment or be unexported (golint)
- Line 150: warning: exported function VersionRoute should have comment or be unexported (golint)
- Line 154: warning: exported function AddVersion should have comment or be unexported (golint)
- Line 158: warning: exported function DebugLogging should have comment or be unexported (golint)
- Line 166: warning: exported function AddPredicate should have comment or be unexported (golint)
- Line 171: warning: exported function AddBind should have comment or be unexported (golint)
- Line 179: warning: exported function AddInspect should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
Misspell Finds commonly misspelled English words