Preparing report...

Report for github.com/dropbox/goebpf

A+    Excellent!    Found 14 issues across 36 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!


gocyclo88%

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.

    • goebpf/map.go
    • Line 208: warning: cyclomatic complexity 25 of function (MapType).String() is high (> 15) (gocyclo)
    • Line 453: warning: cyclomatic complexity 24 of function (*EbpfMap).Create() is high (> 15) (gocyclo)
    • goebpf/loader.go
    • Line 150: warning: cyclomatic complexity 25 of function loadAndCreateMaps() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 22 of function loadPrograms() is high (> 15) (gocyclo)
    • goebpf/utils.go
    • Line 355: warning: cyclomatic complexity 21 of function KeyValueToBytes() is high (> 15) (gocyclo)

golint69%

Golint is a linter for Go source code.

    • goebpf/program_socket_filter.go
    • Line 22: warning: exported const SocketFilterDeny should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: comment on exported const SO_ATTACH_BPF should be of the form "SO_ATTACH_BPF ..." (golint)
    • goebpf/goebpf_mock/mock_map.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 573: warning: exported method MockMap.GetNextKeyString should have comment or be unexported (golint)
    • Line 581: warning: exported method MockMap.GetNextKeyInt should have comment or be unexported (golint)
    • Line 586: warning: exported method MockMap.GetNextKeyUint64 should have comment or be unexported (golint)
    • goebpf/examples/kprobe/exec_dump/main.go
    • Line 21: warning: exported var ErrProgramNotFound should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; type Event_t should be EventT (golint)
    • Line 25: warning: exported type Event_t should have comment or be unexported (golint)
    • Line 34: warning: exported type Program should have comment or be unexported (golint)
    • Line 71: warning: exported function LoadProgram should have comment or be unexported (golint)
    • Line 148: warning: exported method Program.AttachProbes should have comment or be unexported (golint)
    • Line 181: warning: exported method Program.DetachProbes should have comment or be unexported (golint)
    • Line 190: warning: exported method Program.ShowInfo should have comment or be unexported (golint)
    • goebpf/map.go
    • Line 401: warning: comment on exported function NewMapFromExistingMapByPath should be of the form "NewMapFromExistingMapByPath ..." (golint)
    • goebpf/program_kprobe.go
    • Line 92: warning: exported const KprobeAttachTypeEntry should have comment (or a comment on this block) 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!