Preparing report...

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

A+    Excellent!    Found 37 issues across 61 files

Tweet

gofmt96%

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!


gocyclo93%

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.


golint42%

Golint is a linter for Go source code.

    • 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/kernel/kernel.go
    • Line 29: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 53: warning: exported method Source.Name should have comment or be unexported (golint)
    • Line 71: warning: exported method Source.Discover should have comment or be unexported (golint)
    • node-feature-discovery/pkg/nfd-master/nfd-master.go
    • Line 46: warning: comment on exported const LabelNs should be of the form "LabelNs ..." (golint)
    • Line 49: warning: comment on exported const AnnotationNsBase should be of the form "AnnotationNsBase ..." (golint)
    • Line 68: warning: comment on exported type Args should be of the form "Args ..." (with optional leading article) (golint)
    • Line 84: warning: exported type NfdMaster should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function NewNfdMaster should be of the form "NewNfdMaster ..." (golint)
    • node-feature-discovery/source/local/local.go
    • Line 39: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 42: warning: exported method Source.Name should have comment or be unexported (golint)
    • Line 53: warning: exported method Source.Discover should have comment or be unexported (golint)
    • node-feature-discovery/source/iommu/iommu.go
    • Line 26: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 29: warning: exported method Source.Name should have comment or be unexported (golint)
    • Line 40: warning: exported method Source.Discover should have comment or be unexported (golint)
    • node-feature-discovery/source/internal/pci_utils.go
    • Line 30: warning: exported type PciDeviceInfo should have comment or be unexported (golint)
    • Line 32: warning: exported var DefaultPciDevAttrs should have comment or be unexported (golint)
    • Line 33: warning: exported var ExtraPciDevAttrs should have comment or be unexported (golint)
    • Line 71: warning: comment on exported function DetectPci should be of the form "DetectPci ..." (golint)
    • node-feature-discovery/source/system/system.go
    • Line 35: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 38: warning: exported method Source.Name should have comment or be unexported (golint)
    • Line 49: warning: exported method Source.Discover should have comment or be unexported (golint)
    • node-feature-discovery/source/custom/custom.go
    • Line 29: warning: comment on exported type MatchRule should be of the form "MatchRule ..." (with optional leading article) (golint)
    • Line 39: warning: exported type FeatureSpec should have comment or be unexported (golint)
    • Line 52: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 57: warning: comment on exported method Source.Name should be of the form "Name ..." (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)
    • node-feature-discovery/source/source.go
    • Line 19: warning: comment on exported type FeatureValue should be of the form "FeatureValue ..." (with optional leading article) (golint)
    • Line 22: warning: exported type Features should have comment or be unexported (golint)
    • Line 42: warning: exported type Config should have comment or be unexported (golint)
    • node-feature-discovery/source/usb/usb.go
    • Line 29: warning: exported type Config should have comment or be unexported (golint)
    • Line 45: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported method Source.Name should be of the form "Name ..." (golint)
    • node-feature-discovery/source/cpu/rdt_amd64.go
    • Line 26: warning: comment on exported const LEAF_EXT_FEATURE_FLAGS should be of the form "LEAF_EXT_FEATURE_FLAGS ..." (golint)
    • Line 28: warning: exported const LEAF_RDT_MONITORING should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported const RDT_MONITORING_SUBLEAF_L3 should be of the form "RDT_MONITORING_SUBLEAF_L3 ..." (golint)
    • Line 34: warning: comment on exported const EXT_FEATURE_FLAGS_EBX_RDT_M should be of the form "EXT_FEATURE_FLAGS_EBX_RDT_M ..." (golint)
    • node-feature-discovery/pkg/nfd-worker/nfd-worker.go
    • Line 60: warning: comment on exported type NFDConfig should be of the form "NFDConfig ..." (with optional leading article) (golint)
    • Line 79: warning: comment on exported type Args should be of the form "Args ..." (with optional leading article) (golint)
    • Line 104: warning: exported type NfdWorker should have comment or be unexported (golint)
    • Line 126: warning: comment on exported function NewNfdWorker should be of the form "NewNfdWorker ..." (golint)
    • node-feature-discovery/pkg/apihelper/k8shelpers.go
    • Line 31: warning: comment on exported type K8sHelpers should be of the form "K8sHelpers ..." (with optional leading article) (golint)
    • Line 36: warning: exported method K8sHelpers.GetClient should have comment or be unexported (golint)
    • Line 57: warning: exported method K8sHelpers.GetNode should have comment or be unexported (golint)
    • Line 67: warning: exported method K8sHelpers.GetNodes should have comment or be unexported (golint)
    • Line 71: warning: exported method K8sHelpers.UpdateNode should have comment or be unexported (golint)
    • Line 81: warning: exported method K8sHelpers.PatchNode should have comment or be unexported (golint)
    • Line 92: warning: exported method K8sHelpers.PatchNodeStatus should have comment or be unexported (golint)
    • node-feature-discovery/source/pci/pci.go
    • Line 29: warning: exported type Config should have comment or be unexported (golint)
    • Line 42: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported method Source.Name should be of the form "Name ..." (golint)
    • node-feature-discovery/source/cpu/cpu.go
    • Line 34: warning: exported type Config should have comment or be unexported (golint)
    • Line 79: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 85: warning: exported method Source.Name should have comment or be unexported (golint)
    • Line 104: warning: exported method Source.Discover 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!