Preparing report...

Report for github.com/ligato/cn-infra

A+    Excellent!    Found 32 issues across 359 files

Tweet

gofmt98%

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!


gocyclo98%

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.


golint97%

Golint is a linter for Go source code.

    • cn-infra/utils/redact/string.go
    • Line 24: warning: exported method MaskedString.Redacted should have comment or be unexported (golint)
    • Line 32: warning: exported method MaskedString.MarshalText should have comment or be unexported (golint)
    • cn-infra/logging/logrus/entry.go
    • Line 75: warning: exported method Entry.Log should have comment or be unexported (golint)
    • Line 81: warning: exported method Entry.Logf should have comment or be unexported (golint)
    • Line 87: warning: exported method Entry.Logln should have comment or be unexported (golint)
    • cn-infra/logging/logrus/formatter.go
    • Line 54: warning: exported type Formatter should have comment or be unexported (golint)
    • Line 62: warning: exported function NewFormatter should have comment or be unexported (golint)
    • Line 72: warning: exported method Formatter.Format should have comment or be unexported (golint)
    • cn-infra/logging/logrus/logger.go
    • Line 88: warning: exported method Logger.GetName should have comment or be unexported (golint)
    • Line 136: warning: exported method Logger.SetLevel should have comment or be unexported (golint)
    • Line 140: warning: exported method Logger.GetLevel should have comment or be unexported (golint)
    • Line 144: warning: exported method Logger.AddHook should have comment or be unexported (golint)
    • Line 148: warning: exported method Logger.SetOutput should have comment or be unexported (golint)
    • Line 152: warning: exported method Logger.SetFormatter should have comment or be unexported (golint)
    • Line 156: warning: exported method Logger.SetReportCaller should have comment or be unexported (golint)
    • Line 160: warning: exported method Logger.WithError should have comment or be unexported (golint)
    • Line 167: warning: exported method Logger.WithContext should have comment or be unexported (golint)
    • Line 217: warning: exported method Logger.Log should have comment or be unexported (golint)
    • Line 223: warning: exported method Logger.Logf should have comment or be unexported (golint)
    • Line 229: warning: exported method Logger.Logln should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words