Report for github.com/rebel-source/fmtlogwrapper

(v0.0.0-20210222033517-285d07fc5cd5)

B    Not bad!    Found 4 issues across 5 files

Tweet

gofmt60%

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!


gocyclo100%

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.

No problems detected. Good job!


golint40%

Golint is a linter for Go source code.

    • fmtlogwrapper/audit.go
    • Line 43: warning: exported function Now should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function Audit should be of the form "Audit ..." (golint)
    • Line 81: warning: comment on exported function InitAuditLogger should be of the form "InitAuditLogger ..." (golint)
    • Line 108: warning: comment on exported function AuditLogger should be of the form "AuditLogger ..." (golint)
    • Line 138: warning: exported function Persist should have comment or be unexported (golint)
    • Line 145: warning: exported function GenSHA should have comment or be unexported (golint)
    • fmtlogwrapper/logger.go
    • Line 1: warning: package comment should be of the form "Package fmtlogwrapper ..." (golint)
    • Line 20: warning: comment on exported type LogSettings should be of the form "LogSettings ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported type Logger should be of the form "Logger ..." (with optional leading article) (golint)
    • Line 44: warning: don't use underscores in Go names; struct field write_muted should be writeMuted (golint)
    • Line 45: warning: don't use underscores in Go names; struct field console_muted should be consoleMuted (golint)
    • Line 56: warning: exported var AppLogger should have comment or be unexported (golint)
    • Line 60: warning: comment on exported function InitAppLogger should be of the form "InitAppLogger ..." (golint)
    • Line 67: warning: comment on exported function NewLogger should be of the form "NewLogger ..." (golint)
    • Line 98: warning: error should be the last type when returning multiple items (golint)
    • Line 157: warning: exported method Logger.GetProxy should have comment or be unexported (golint)
    • Line 161: warning: comment on exported method Logger.SetProxy should be of the form "SetProxy ..." (golint)
    • Line 186: warning: comment on exported method Logger.MuteWrite should be of the form "MuteWrite ..." (golint)
    • Line 191: warning: exported method Logger.MuteConsole should have comment or be unexported (golint)
    • Line 242: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 257: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 262: warning: exported method Logger.LogStr should have comment or be unexported (golint)
    • Line 268: warning: comment on exported method Logger.LogChain should be of the form "LogChain ..." (golint)
    • Line 288: warning: comment on exported method Logger.Printf should be of the form "Printf ..." (golint)
    • Line 298: warning: comment on exported method Logger.Println should be of the form "Println ..." (golint)
    • Line 308: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 319: warning: comment on exported type ProxyLogger should be of the form "ProxyLogger ..." (with optional leading article) (golint)
    • Line 334: warning: comment on exported method Logger.ClearBuffer should be of the form "ClearBuffer ..." (golint)
    • Line 339: warning: comment on exported method Logger.CommitBuffer should be of the form "CommitBuffer ..." (golint)
    • Line 355: warning: exported method Logger.GetBuffer should have comment or be unexported (golint)
    • Line 359: warning: comment on exported method Logger.WriteToBuffer should be of the form "WriteToBuffer ..." (golint)
    • Line 373: warning: comment on exported function InitContextLogger should be of the form "InitContextLogger ..." (golint)
    • Line 385: warning: comment on exported function ContextLoggers should be of the form "ContextLoggers ..." (golint)
    • fmtlogwrapper/utils.go
    • Line 10: warning: comment on exported function OpenFilePathExists should be of the form "OpenFilePathExists ..." (golint)
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 32: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: exported function DoesFileExist should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: exported function GetType should have comment or be unexported (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!