Preparing report...

Report for github.com/cosandr/go-motd

A+    Excellent!    Found 9 issues across 22 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!


gocyclo86%

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.

    • go-motd/datasources/btrfs.go
    • Line 75: warning: cyclomatic complexity 21 of function getBtrfsStatusExec() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 17 of function getBtrfsStatus() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • go-motd/utils/colors.go
    • Line 6: warning: exported var Good should have comment or be unexported (golint)
    • Line 22: warning: exported function Color should have comment or be unexported (golint)
    • go-motd/tools/new_configs.go
    • Line 3: warning: exported type Conf should have comment or be unexported (golint)
    • Line 42: warning: exported type ConfGlobal should have comment or be unexported (golint)
    • Line 53: warning: exported type ConfBase should have comment or be unexported (golint)
    • Line 76: warning: exported type ConfTempCPU should have comment or be unexported (golint)
    • Line 82: warning: exported type ConfTempDisk should have comment or be unexported (golint)
    • Line 90: warning: exported type ConfDocker should have comment or be unexported (golint)
    • Line 98: warning: exported type ConfPodman should have comment or be unexported (golint)
    • Line 108: warning: exported type ConfSystemd should have comment or be unexported (golint)
    • Line 120: warning: exported type ConfUpdates should have comment or be unexported (golint)
    • go-motd/tools/old_configs.go
    • Line 49: warning: exported type OldCommonConf should have comment or be unexported (golint)
    • Line 69: warning: exported type OldCPUTempConf should have comment or be unexported (golint)
    • Line 74: warning: exported type OldDiskConf should have comment or be unexported (golint)
    • Line 80: warning: exported type OldDockerConf should have comment or be unexported (golint)
    • Line 86: warning: exported type OldPodmanConf should have comment or be unexported (golint)
    • Line 93: warning: exported type OldSystemdConf should have comment or be unexported (golint)
    • Line 101: warning: exported type OldUpdatesConf should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!