Preparing report...

Report for github.com/it-novum/openitcockpit-agent-go

(v0.0.0-20220209171718-ed01743b63e1)

A+    Excellent!    Found 36 issues across 115 files

Tweet

gofmt86%

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.


golint83%

Golint is a linter for Go source code.

    • posix.go
    • Line 11: warning: don't use underscores in Go names; func platform_main should be platformMain (golint)
    • pushclient/push.go
    • Line 67: warning: exported type PushClient should have comment or be unexported (golint)
    • Line 287: warning: exported method PushClient.Shutdown should have comment or be unexported (golint)
    • Line 292: warning: comment on exported method PushClient.Start should be of the form "Start ..." (golint)
    • utils/command.go
    • Line 38: warning: exported type CommandArgs should have comment or be unexported (golint)
    • Line 137: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • utils/path.go
    • Line 5: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 12: warning: exported function FileNotExists should have comment or be unexported (golint)
    • checks/diskio.go
    • Line 32: warning: don't use underscores in Go names; struct field Frequency_PerfTime should be FrequencyPerfTime (golint)
    • Line 33: warning: don't use underscores in Go names; struct field Timestamp_Sys100NS should be TimestampSys100NS (golint)
    • Line 35: warning: don't use underscores in Go names; struct field AvgDiskSecPerRead_Base should be AvgDiskSecPerReadBase (golint)
    • Line 37: warning: don't use underscores in Go names; struct field AvgDiskSecPerWrite_Base should be AvgDiskSecPerWriteBase (golint)
    • Line 39: warning: don't use underscores in Go names; struct field PercentDiskTime_Base should be PercentDiskTimeBase (golint)
    • Line 45: warning: don't use underscores in Go names; struct field AvgDiskBytesPerRead_Base should be AvgDiskBytesPerReadBase (golint)
    • Line 47: warning: don't use underscores in Go names; struct field AvgDiskBytesPerWrite_Base should be AvgDiskBytesPerWriteBase (golint)
    • checks/net.go
    • Line 14: warning: exported const DUPLEX_FULL should have comment or be unexported (golint)
    • Line 15: warning: exported const DUPLEX_HALF should have comment or be unexported (golint)
    • Line 16: warning: exported const DUPLEX_UNKNOWN should have comment or be unexported (golint)
    • cmd/cmd.go
    • Line 18: warning: exported type RootCmd should have comment or be unexported (golint)
    • Line 118: warning: exported function New should have comment or be unexported (golint)
    • Line 143: warning: exported method RootCmd.Execute should have comment or be unexported (golint)
    • Line 150: warning: exported method RootCmd.Shutdown should have comment or be unexported (golint)
    • cmd/cmd_posix.go
    • Line 7: warning: exported function PlatformMain should have comment or be unexported (golint)
    • checks/checks.go
    • Line 26: warning: exported function ChecksForConfiguration should have comment or be unexported (golint)
    • Line 64: warning: exported function WrapDiffUint32 should have comment or be unexported (golint)
    • Line 72: warning: exported function WrapDiffUint64 should have comment or be unexported (golint)
    • Line 80: warning: exported function WrapDiffInt32 should have comment or be unexported (golint)
    • Line 88: warning: exported function WrapDiffInt64 should have comment or be unexported (golint)
    • config/config.go
    • Line 36: warning: exported type PushConfiguration should have comment or be unexported (golint)
    • Line 263: warning: exported method Configuration.SaveConfiguration should have comment or be unexported (golint)
    • Line 270: warning: exported method Configuration.ReadConfigurationFile should have comment or be unexported (golint)
    • Line 274: warning: exported method Configuration.SaveCustomCheckConfiguration should have comment or be unexported (golint)
    • Line 281: warning: exported method Configuration.ReadCustomCheckConfiguration should have comment or be unexported (golint)
    • safemaths/divide.go
    • Line 5: warning: exported function DivideFloat64 should have comment or be unexported (golint)
    • Line 13: warning: comment on exported function DivideInt should be of the form "DivideInt ..." (golint)
    • Line 21: warning: exported function DivideUint64 should have comment or be unexported (golint)
    • Line 28: warning: exported function DivideInt64 should have comment or be unexported (golint)
    • checkrunner/checkrunner.go
    • Line 16: warning: exported type CheckRunner should have comment or be unexported (golint)
    • Line 26: warning: exported method CheckRunner.Shutdown should have comment or be unexported (golint)
    • checkrunner/customcheck.go
    • Line 14: warning: exported type CustomCheckExecutor should have comment or be unexported (golint)
    • Line 22: warning: exported method CustomCheckExecutor.Shutdown should have comment or be unexported (golint)
    • Line 56: warning: exported method CustomCheckExecutor.Start should have comment or be unexported (golint)
    • checkrunner/customcheckhandler.go
    • Line 12: warning: exported type CustomCheckResult should have comment or be unexported (golint)
    • Line 55: warning: comment on exported method CustomCheckHandler.Start should be of the form "Start ..." (golint)
    • agentrt/instance.go
    • Line 19: warning: exported type AgentInstance should have comment or be unexported (golint)
    • Line 218: warning: exported method AgentInstance.Start should have comment or be unexported (golint)
    • Line 279: warning: exported method AgentInstance.Reload should have comment or be unexported (golint)
    • Line 288: warning: exported method AgentInstance.Shutdown should have comment or be unexported (golint)
    • utils/concat.go
    • Line 3: warning: exported function ConcatStringSlice should have comment or be unexported (golint)
    • utils/file.go
    • Line 8: warning: exported function CopyFile 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!


misspell95%

Misspell Finds commonly misspelled English words