Preparing report...

Report for github.com/khorevaa/logos

A+    Excellent!    Found 29 issues across 43 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!


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!


golint46%

Golint is a linter for Go source code.

    • logos/internal/common/uintset.go
    • Line 5: warning: exported type UintSet should have comment or be unexported (golint)
    • Line 7: warning: exported function MakeUintSetFromStrings should have comment or be unexported (golint)
    • Line 23: warning: exported function MakeUintSet should have comment or be unexported (golint)
    • Line 35: warning: exported method UintSet.Add should have comment or be unexported (golint)
    • Line 39: warning: exported method UintSet.Del should have comment or be unexported (golint)
    • Line 43: warning: exported method UintSet.Count should have comment or be unexported (golint)
    • Line 47: warning: exported method UintSet.Has should have comment or be unexported (golint)
    • logos/encoder/console/config.go
    • Line 5: warning: comment on exported type ColorSchemaConfig should be of the form "ColorSchemaConfig ..." (with optional leading article) (golint)
    • Line 18: warning: exported method ColorSchemaConfig.Parse should have comment or be unexported (golint)
    • logos/appender/gelfudp/id.go
    • Line 12: warning: exported type IdGenerator should have comment or be unexported (golint)
    • Line 16: warning: exported type DefaultIdGenerator should have comment or be unexported (golint)
    • Line 20: warning: exported function NewDefaultIdGenerator should have comment or be unexported (golint)
    • Line 24: warning: exported method DefaultIdGenerator.NextId should have comment or be unexported (golint)
    • Line 31: warning: exported function GuessIP should have comment or be unexported (golint)
    • logos/appender/file/file.go
    • Line 9: warning: exported type File should have comment or be unexported (golint)
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 21: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • logos/encoder/gelf/gelf.go
    • Line 12: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 17: warning: exported type KeyValuePair should have comment or be unexported (golint)
    • Line 22: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported method Encoder.EncodeEntry should have comment or be unexported (golint)
    • Line 41: warning: exported function LevelEncoder should have comment or be unexported (golint)
    • logos/internal/common/config.go
    • Line 32: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 68: warning: exported function MergeConfigs should have comment or be unexported (golint)
    • Line 78: warning: exported function NewConfigWithYAML should have comment or be unexported (golint)
    • Line 94: warning: exported function LoadFile should have comment or be unexported (golint)
    • Line 108: warning: exported method Config.Merge should have comment or be unexported (golint)
    • Line 112: warning: exported method Config.Unpack should have comment or be unexported (golint)
    • Line 116: warning: exported method Config.Path should have comment or be unexported (golint)
    • Line 120: warning: exported method Config.PathOf should have comment or be unexported (golint)
    • Line 124: warning: exported method Config.HasField should have comment or be unexported (golint)
    • Line 128: warning: exported method Config.FlattenedKeys should have comment or be unexported (golint)
    • Line 132: warning: exported method Config.CountField should have comment or be unexported (golint)
    • Line 136: warning: exported method Config.Name should have comment or be unexported (golint)
    • Line 140: warning: exported method Config.MustName should have comment or be unexported (golint)
    • Line 151: warning: exported method Config.Bool should have comment or be unexported (golint)
    • Line 159: warning: exported method Config.Int should have comment or be unexported (golint)
    • Line 163: warning: exported method Config.Float should have comment or be unexported (golint)
    • Line 167: warning: exported method Config.Child should have comment or be unexported (golint)
    • Line 172: warning: exported method Config.SetBool should have comment or be unexported (golint)
    • Line 176: warning: exported method Config.SetInt should have comment or be unexported (golint)
    • Line 180: warning: exported method Config.SetFloat should have comment or be unexported (golint)
    • Line 184: warning: exported method Config.SetString should have comment or be unexported (golint)
    • Line 188: warning: exported method Config.SetChild should have comment or be unexported (golint)
    • Line 192: warning: exported method Config.IsDict should have comment or be unexported (golint)
    • Line 196: warning: exported method Config.IsArray should have comment or be unexported (golint)
    • Line 208: warning: exported method Config.GetFields should have comment or be unexported (golint)
    • logos/encoder/console/methods.go
    • Line 14: warning: exported method Encoder.AppendBool should have comment or be unexported (golint)
    • Line 18: warning: exported method Encoder.AppendByteString should have comment or be unexported (golint)
    • Line 22: warning: exported method Encoder.AppendComplex128 should have comment or be unexported (golint)
    • Line 28: warning: exported method Encoder.AppendComplex64 should have comment or be unexported (golint)
    • Line 32: warning: exported method Encoder.AppendFloat64 should have comment or be unexported (golint)
    • Line 36: warning: exported method Encoder.AppendFloat32 should have comment or be unexported (golint)
    • Line 40: warning: exported method Encoder.AppendInt should have comment or be unexported (golint)
    • Line 44: warning: exported method Encoder.AppendInt64 should have comment or be unexported (golint)
    • Line 48: warning: exported method Encoder.AppendInt32 should have comment or be unexported (golint)
    • Line 52: warning: exported method Encoder.AppendInt16 should have comment or be unexported (golint)
    • Line 56: warning: exported method Encoder.AppendInt8 should have comment or be unexported (golint)
    • Line 60: warning: exported method Encoder.AppendString should have comment or be unexported (golint)
    • Line 64: warning: exported method Encoder.AppendUint should have comment or be unexported (golint)
    • Line 68: warning: exported method Encoder.AppendUint64 should have comment or be unexported (golint)
    • Line 72: warning: exported method Encoder.AppendUint32 should have comment or be unexported (golint)
    • Line 76: warning: exported method Encoder.AppendUint16 should have comment or be unexported (golint)
    • Line 80: warning: exported method Encoder.AppendUint8 should have comment or be unexported (golint)
    • Line 84: warning: exported method Encoder.AppendUintptr should have comment or be unexported (golint)
    • Line 88: warning: exported method Encoder.AddArray should have comment or be unexported (golint)
    • Line 93: warning: exported method Encoder.AddObject should have comment or be unexported (golint)
    • Line 98: warning: exported method Encoder.AddBinary should have comment or be unexported (golint)
    • Line 102: warning: exported method Encoder.AddByteString should have comment or be unexported (golint)
    • Line 106: warning: exported method Encoder.AddBool should have comment or be unexported (golint)
    • Line 111: warning: exported method Encoder.AddComplex128 should have comment or be unexported (golint)
    • Line 116: warning: exported method Encoder.AddComplex64 should have comment or be unexported (golint)
    • Line 121: warning: exported method Encoder.AddDuration should have comment or be unexported (golint)
    • Line 126: warning: exported method Encoder.AddFloat64 should have comment or be unexported (golint)
    • Line 131: warning: exported method Encoder.AddFloat32 should have comment or be unexported (golint)
    • Line 135: warning: exported method Encoder.AddInt should have comment or be unexported (golint)
    • Line 139: warning: exported method Encoder.AddInt64 should have comment or be unexported (golint)
    • Line 144: warning: exported method Encoder.AddInt32 should have comment or be unexported (golint)
    • Line 148: warning: exported method Encoder.AddInt16 should have comment or be unexported (golint)
    • Line 152: warning: exported method Encoder.AddInt8 should have comment or be unexported (golint)
    • Line 156: warning: exported method Encoder.AddString should have comment or be unexported (golint)
    • Line 161: warning: exported method Encoder.AddTime should have comment or be unexported (golint)
    • Line 166: warning: exported method Encoder.AddUint should have comment or be unexported (golint)
    • Line 170: warning: exported method Encoder.AddUint64 should have comment or be unexported (golint)
    • Line 175: warning: exported method Encoder.AddUint32 should have comment or be unexported (golint)
    • Line 179: warning: exported method Encoder.AddUint16 should have comment or be unexported (golint)
    • Line 183: warning: exported method Encoder.AddUint8 should have comment or be unexported (golint)
    • Line 187: warning: exported method Encoder.AddUintptr should have comment or be unexported (golint)
    • Line 191: warning: exported method Encoder.AddReflected should have comment or be unexported (golint)
    • Line 201: warning: exported method Encoder.OpenNamespace should have comment or be unexported (golint)
    • Line 206: warning: exported method Encoder.AppendDuration should have comment or be unexported (golint)
    • Line 215: warning: exported method Encoder.AppendTime should have comment or be unexported (golint)
    • Line 229: warning: exported method Encoder.AppendArray should have comment or be unexported (golint)
    • Line 236: warning: exported method Encoder.AppendObject should have comment or be unexported (golint)
    • Line 243: warning: exported method Encoder.AppendReflected should have comment or be unexported (golint)
    • logos/appender/gelfudp/gelfudp.go
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 32: warning: exported const MaxDatagramSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported var Magic should have comment or be unexported (golint)
    • Line 44: warning: exported var ErrTooLargeMessageSize should have comment or be unexported (golint)
    • Line 46: warning: exported type UDPSender should have comment or be unexported (golint)
    • Line 52: warning: exported function NewUDPSender should have comment or be unexported (golint)
    • Line 73: warning: exported method UDPSender.Send should have comment or be unexported (golint)
    • Line 108: warning: exported function NewCompressor should have comment or be unexported (golint)
    • Line 127: warning: exported type Compressor should have comment or be unexported (golint)
    • Line 132: warning: exported method Compressor.Compress should have comment or be unexported (golint)
    • Line 163: warning: exported type Writer should have comment or be unexported (golint)
    • Line 179: warning: exported function New should have comment or be unexported (golint)
    • logos/timing.go
    • Line 9: warning: exported type Kvs should have comment or be unexported (golint)
    • Line 11: warning: exported type Emitter should have comment or be unexported (golint)
    • Line 49: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 58: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 68: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 77: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 96: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 114: warning: receiver name e should be consistent with previous receiver name l for warpLogger (golint)
    • Line 141: warning: exported type CompletionStatus should have comment or be unexported (golint)
    • Line 144: warning: exported const Success should have comment (or a comment on this block) or be unexported (golint)
    • Line 163: warning: exported type Job should have comment or be unexported (golint)
    • Line 171: warning: exported method Job.Event should have comment or be unexported (golint)
    • Line 176: warning: exported method Job.EventKv should have comment or be unexported (golint)
    • Line 181: warning: exported method Job.EventErr should have comment or be unexported (golint)
    • Line 188: warning: exported method Job.EventErrKv should have comment or be unexported (golint)
    • Line 194: warning: exported method Job.Timing should have comment or be unexported (golint)
    • Line 199: warning: exported method Job.TimingKv should have comment or be unexported (golint)
    • Line 204: warning: exported method Job.Gauge should have comment or be unexported (golint)
    • Line 209: warning: exported method Job.GaugeKv should have comment or be unexported (golint)
    • Line 214: warning: exported method Job.Complete should have comment or be unexported (golint)
    • Line 220: warning: exported method Job.CompleteErr should have comment or be unexported (golint)
    • Line 229: warning: exported method Job.CompleteKv should have comment or be unexported (golint)
    • Line 234: warning: exported method Job.KeyValue should have comment or be unexported (golint)
    • logos/internal/common/floatset.go
    • Line 5: warning: exported type FloatSet should have comment or be unexported (golint)
    • Line 7: warning: exported function MakeFloatSetFromStrings should have comment or be unexported (golint)
    • Line 23: warning: exported function MakeFloatSet should have comment or be unexported (golint)
    • Line 35: warning: exported method FloatSet.Add should have comment or be unexported (golint)
    • Line 39: warning: exported method FloatSet.Del should have comment or be unexported (golint)
    • Line 43: warning: exported method FloatSet.Count should have comment or be unexported (golint)
    • Line 47: warning: exported method FloatSet.Has should have comment or be unexported (golint)
    • logos/internal/common/stringset.go
    • Line 3: warning: exported type StringSet should have comment or be unexported (golint)
    • Line 5: warning: exported function MakeStringSet should have comment or be unexported (golint)
    • Line 17: warning: exported method StringSet.Add should have comment or be unexported (golint)
    • Line 21: warning: exported method StringSet.Del should have comment or be unexported (golint)
    • Line 25: warning: exported method StringSet.Count should have comment or be unexported (golint)
    • Line 29: warning: exported method StringSet.Has should have comment or be unexported (golint)
    • Line 36: warning: exported method StringSet.ToSlice should have comment or be unexported (golint)
    • logos/encoder/console/color.go
    • Line 11: warning: comment on exported const NoColor should be of the form "NoColor ..." (golint)
    • Line 18: warning: exported const Black should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported const BackgroundBlack should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: comment on exported type ColorScheme should be of the form "ColorScheme ..." (with optional leading article) (golint)
    • logos/internal/common/intset.go
    • Line 5: warning: exported type IntSet should have comment or be unexported (golint)
    • Line 7: warning: exported function MakeIntSetFromStrings should have comment or be unexported (golint)
    • Line 23: warning: exported function MakeIntSet should have comment or be unexported (golint)
    • Line 35: warning: exported method IntSet.Add should have comment or be unexported (golint)
    • Line 39: warning: exported method IntSet.Del should have comment or be unexported (golint)
    • Line 43: warning: exported method IntSet.Count should have comment or be unexported (golint)
    • Line 47: warning: exported method IntSet.Has should have comment or be unexported (golint)
    • logos/logos.go
    • Line 19: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 176: warning: exported function InitWithConfigContent should have comment or be unexported (golint)
    • Line 195: warning: exported function New should have comment or be unexported (golint)
    • Line 199: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 203: warning: exported function UpdateLogger should have comment or be unexported (golint)
    • Line 207: warning: exported function Sync should have comment or be unexported (golint)
    • Line 211: warning: exported function RedirectStdLog should have comment or be unexported (golint)
    • Line 215: warning: exported function CancelRedirectStdLog should have comment or be unexported (golint)
    • logos/warp_zap.go
    • Line 9: warning: exported var StackTraceLevelEnabler should have comment or be unexported (golint)
    • logos/appender/appender.go
    • Line 18: warning: exported type WriterFactory should have comment or be unexported (golint)
    • Line 19: warning: exported type EncoderFactory should have comment or be unexported (golint)
    • Line 21: warning: exported type Appender should have comment or be unexported (golint)
    • Line 33: warning: exported function CreateAppender should have comment or be unexported (golint)
    • Line 53: warning: exported function RegisterWriterType should have comment or be unexported (golint)
    • Line 60: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 68: warning: exported type EncoderConfig should have comment or be unexported (golint)
    • Line 72: warning: exported function RegisterEncoderType should have comment or be unexported (golint)
    • Line 79: warning: exported function CreateEncoder should have comment or be unexported (golint)
    • logos/encoder/common/common.go
    • Line 8: warning: comment on exported type JsonEncoderConfig should be of the form "JsonEncoderConfig ..." (with optional leading article) (golint)
    • Line 20: warning: exported function GetTimeEncoder should have comment or be unexported (golint)
    • logos/appender/console/console.go
    • Line 13: warning: exported type Console should have comment or be unexported (golint)
    • Line 18: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported type Target should have comment or be unexported (golint)
    • Line 26: warning: exported const Discard should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: exported function NewConsole should have comment or be unexported (golint)
    • logos/level.go
    • Line 9: warning: comment on exported const OffLevel should be of the form "OffLevel ..." (golint)
    • logos/types.go
    • Line 51: warning: exported type Logger should have comment or be unexported (golint)
    • Line 63: warning: exported type SugaredLogger should have comment or be unexported (golint)
    • logos/config/config.go
    • Line 7: warning: exported const DefaultConfig should have comment or be unexported (golint)
    • Line 23: warning: exported type Config should have comment or be unexported (golint)
    • Line 28: warning: exported type ScanConfig should have comment or be unexported (golint)
    • Line 33: warning: exported type Loggers should have comment or be unexported (golint)
    • Line 38: warning: exported type RootLogger should have comment or be unexported (golint)
    • Line 44: warning: exported type LoggerConfig should have comment or be unexported (golint)
    • Line 53: warning: exported type AppenderConfig should have comment or be unexported (golint)
    • logos/errors.go
    • Line 6: warning: exported var ErrEnvConfigNotSet should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.

    • logos/benchmarks/apex_test.go
    • Line 6: warning: no required module provides package github.com/apex/log; to add it: (ineffassign)
    • Line 7: warning: no required module provides package github.com/apex/log/handlers/json; to add it: (ineffassign)
    • Line 6: warning: could not import github.com/apex/log (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/apex/log/handlers/json (invalid package name: "") (ineffassign)
    • logos/benchmarks/logos_test.go
    • Line 6: warning: no required module provides package github.com/khorevaa/logos; to add it: (ineffassign)
    • Line 9: warning: no required module provides package go.uber.org/multierr; to add it: (ineffassign)
    • Line 10: warning: no required module provides package go.uber.org/zap; to add it: (ineffassign)
    • Line 12: warning: no required module provides package go.uber.org/zap/zapcore; to add it: (ineffassign)
    • Line 6: warning: could not import github.com/khorevaa/logos (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import go.uber.org/multierr (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import go.uber.org/zap (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import go.uber.org/zap/zapcore (invalid package name: "") (ineffassign)
    • logos/benchmarks/logus_test.go
    • Line 6: warning: no required module provides package github.com/sirupsen/logrus; to add it: (ineffassign)
    • Line 6: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • logos/timing_test.go
    • Line 220: warning: cannot use tt.fields.KeyValues (variable of type map[string]string) as map[string]interface{} value in struct literal (ineffassign)
    • Line 227: warning: cannot use tt.args.KeyValues (variable of type map[string]string) as map[string]interface{} value in argument to j.EventKv (ineffassign)
    • Line 231: warning: cannot use tt.args.KeyValues (variable of type map[string]string) as map[string]interface{} value in argument to j.EventErrKv (ineffassign)
    • Line 235: warning: cannot use tt.args.KeyValues (variable of type map[string]string) as map[string]interface{} value in argument to j.CompleteKv (ineffassign)
    • Line 237: warning: cannot use tt.args.nanos (variable of type int64) as time.Duration value in argument to j.Timing (ineffassign)
    • Line 239: warning: cannot use tt.args.nanos (variable of type int64) as time.Duration value in argument to j.TimingKv (ineffassign)
    • Line 239: warning: cannot use tt.args.KeyValues (variable of type map[string]string) as map[string]interface{} value in argument to j.TimingKv (ineffassign)
    • Line 243: warning: cannot use tt.args.KeyValues (variable of type map[string]string) as map[string]interface{} value in argument to j.GaugeKv (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!