Preparing report...

Report for github.com/kubernetes-sigs/node-feature-discovery

A+    Excellent!    Found 42 issues across 85 files

Tweet

gofmt100%

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

No problems detected. Good job!


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.


golint50%

Golint is a linter for Go source code.

    • node-feature-discovery/pkg/nfd-client/worker/nfd-worker.go
    • Line 56: warning: comment on exported type NFDConfig should be of the form "NFDConfig ..." (with optional leading article) (golint)
    • Line 75: warning: comment on exported type Args should be of the form "Args ..." (with optional leading article) (golint)
    • Line 113: warning: comment on exported function NewNfdWorker should be of the form "NewNfdWorker ..." (golint)
    • node-feature-discovery/source/internal/usb_utils.go
    • Line 29: warning: exported type UsbDeviceInfo should have comment or be unexported (golint)
    • Line 30: warning: exported type UsbClassMap should have comment or be unexported (golint)
    • Line 32: warning: exported var DefaultUsbDevAttrs should have comment or be unexported (golint)
    • Line 105: warning: comment on exported function DetectUsb should be of the form "DetectUsb ..." (golint)
    • node-feature-discovery/source/custom/custom.go
    • Line 29: warning: exported const Name should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type MatchRule should be of the form "MatchRule ..." (with optional leading article) (golint)
    • Line 41: warning: exported type FeatureSpec should have comment or be unexported (golint)
    • node-feature-discovery/pkg/api/feature/feature.go
    • Line 28: warning: exported function NewKeyFeatures should have comment or be unexported (golint)
    • Line 30: warning: exported function NewValueFeatures should have comment or be unexported (golint)
    • Line 32: warning: exported function NewInstanceFeatures should have comment or be unexported (golint)
    • Line 34: warning: exported function NewInstanceFeature should have comment or be unexported (golint)
    • node-feature-discovery/source/config.go
    • Line 25: warning: comment on exported var BootDir should be of the form "BootDir ..." (golint)
    • Line 27: warning: comment on exported var EtcDir should be of the form "EtcDir ..." (golint)
    • Line 29: warning: comment on exported var SysfsDir should be of the form "SysfsDir ..." (golint)
    • Line 31: warning: comment on exported var UsrDir should be of the form "UsrDir ..." (golint)
    • Line 33: warning: comment on exported var VarDir should be of the form "VarDir ..." (golint)
    • node-feature-discovery/pkg/apihelper/k8shelpers.go
    • Line 32: warning: comment on exported type K8sHelpers should be of the form "K8sHelpers ..." (with optional leading article) (golint)
    • Line 37: warning: exported method K8sHelpers.GetClient should have comment or be unexported (golint)
    • Line 58: warning: exported method K8sHelpers.GetTopologyClient should have comment or be unexported (golint)
    • Line 79: warning: exported method K8sHelpers.GetNode should have comment or be unexported (golint)
    • Line 89: warning: exported method K8sHelpers.GetNodes should have comment or be unexported (golint)
    • Line 93: warning: exported method K8sHelpers.UpdateNode should have comment or be unexported (golint)
    • Line 103: warning: exported method K8sHelpers.PatchNode should have comment or be unexported (golint)
    • Line 114: warning: exported method K8sHelpers.PatchNodeStatus should have comment or be unexported (golint)
    • Line 126: warning: exported method K8sHelpers.GetPod should have comment or be unexported (golint)
    • node-feature-discovery/source/cpu/rdt_amd64.go
    • Line 27: warning: comment on exported const LEAF_EXT_FEATURE_FLAGS should be of the form "LEAF_EXT_FEATURE_FLAGS ..." (golint)
    • Line 29: warning: exported const LEAF_RDT_MONITORING should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const RDT_MONITORING_SUBLEAF_L3 should be of the form "RDT_MONITORING_SUBLEAF_L3 ..." (golint)
    • Line 35: warning: comment on exported const EXT_FEATURE_FLAGS_EBX_RDT_M should be of the form "EXT_FEATURE_FLAGS_EBX_RDT_M ..." (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!


misspell98%

Misspell Finds commonly misspelled English words