Preparing report...

Report for github.com/meandrewdev/viper

(v1.10.1)

A+    Excellent!    Found 8 issues across 27 files

Tweet

gofmt96%

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!


gocyclo92%

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.

    • viper.go
    • Line 1166: warning: cyclomatic complexity 40 of function (*Viper).find() is high (> 15) (gocyclo)
    • Line 388: warning: cyclomatic complexity 16 of function (*Viper).WatchConfig() is high (> 15) (gocyclo)
    • Line 841: warning: cyclomatic complexity 16 of function (*Viper).Get() is high (> 15) (gocyclo)
    • viper_test.go
    • Line 1915: warning: cyclomatic complexity 18 of function TestMergeConfig() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • viper.go
    • Line 65: warning: exported type RemoteResponse should have comment or be unexported (golint)
    • Line 381: warning: exported function OnConfigChange should have comment or be unexported (golint)
    • Line 382: warning: exported method Viper.OnConfigChange should have comment or be unexported (golint)
    • Line 386: warning: exported function WatchConfig should have comment or be unexported (golint)
    • Line 388: warning: exported method Viper.WatchConfig should have comment or be unexported (golint)
    • Line 461: warning: exported method Viper.SetConfigFile should have comment or be unexported (golint)
    • Line 472: warning: exported method Viper.SetEnvPrefix should have comment or be unexported (golint)
    • Line 491: warning: exported method Viper.AllowEmptyEnv should have comment or be unexported (golint)
    • Line 514: warning: exported method Viper.ConfigFileUsed should have comment or be unexported (golint)
    • Line 520: warning: exported method Viper.AddConfigPath should have comment or be unexported (golint)
    • Line 543: warning: exported method Viper.AddRemoteProvider should have comment or be unexported (golint)
    • Line 576: warning: exported method Viper.AddSecureRemoteProvider should have comment or be unexported (golint)
    • Line 823: warning: exported method Viper.SetTypeByDefaultValue should have comment or be unexported (golint)
    • Line 841: warning: exported method Viper.Get should have comment or be unexported (golint)
    • Line 892: warning: exported method Viper.Sub should have comment or be unexported (golint)
    • Line 909: warning: exported method Viper.GetString should have comment or be unexported (golint)
    • Line 916: warning: exported method Viper.GetBool should have comment or be unexported (golint)
    • Line 923: warning: exported method Viper.GetInt should have comment or be unexported (golint)
    • Line 930: warning: exported method Viper.GetInt32 should have comment or be unexported (golint)
    • Line 937: warning: exported method Viper.GetInt64 should have comment or be unexported (golint)
    • Line 944: warning: exported method Viper.GetUint should have comment or be unexported (golint)
    • Line 951: warning: exported method Viper.GetUint32 should have comment or be unexported (golint)
    • Line 958: warning: exported method Viper.GetUint64 should have comment or be unexported (golint)
    • Line 965: warning: exported method Viper.GetFloat64 should have comment or be unexported (golint)
    • Line 972: warning: exported method Viper.GetTime should have comment or be unexported (golint)
    • Line 979: warning: exported method Viper.GetDuration should have comment or be unexported (golint)
    • Line 986: warning: exported method Viper.GetIntSlice should have comment or be unexported (golint)
    • Line 993: warning: exported method Viper.GetStringSlice should have comment or be unexported (golint)
    • Line 1000: warning: exported method Viper.GetStringMap should have comment or be unexported (golint)
    • Line 1007: warning: exported method Viper.GetStringMapString should have comment or be unexported (golint)
    • Line 1014: warning: exported method Viper.GetStringMapStringSlice should have comment or be unexported (golint)
    • Line 1022: warning: exported method Viper.GetSizeInBytes should have comment or be unexported (golint)
    • Line 1032: warning: exported method Viper.UnmarshalKey should have comment or be unexported (golint)
    • Line 1042: warning: exported method Viper.Unmarshal should have comment or be unexported (golint)
    • Line 1079: warning: exported method Viper.UnmarshalExact should have comment or be unexported (golint)
    • Line 1090: warning: exported method Viper.BindPFlags should have comment or be unexported (golint)
    • Line 1102: warning: exported method Viper.BindPFlag should have comment or be unexported (golint)
    • Line 1113: warning: exported method Viper.BindFlagValues should have comment or be unexported (golint)
    • Line 1125: warning: exported method Viper.BindFlagValue should have comment or be unexported (golint)
    • Line 1141: warning: exported method Viper.BindEnv should have comment or be unexported (golint)
    • Line 1339: warning: exported method Viper.IsSet should have comment or be unexported (golint)
    • Line 1349: warning: exported method Viper.AutomaticEnv should have comment or be unexported (golint)
    • Line 1358: warning: exported method Viper.SetEnvKeyReplacer should have comment or be unexported (golint)
    • Line 1366: warning: exported method Viper.RegisterAlias should have comment or be unexported (golint)
    • Line 1415: warning: exported method Viper.InConfig should have comment or be unexported (golint)
    • Line 1430: warning: exported method Viper.SetDefault should have comment or be unexported (golint)
    • Line 1449: warning: exported method Viper.Set should have comment or be unexported (golint)
    • Line 1466: warning: exported method Viper.ReadInConfig should have comment or be unexported (golint)
    • Line 1497: warning: exported method Viper.MergeInConfig should have comment or be unexported (golint)
    • Line 1520: warning: exported method Viper.ReadConfig should have comment or be unexported (golint)
    • Line 1528: warning: exported method Viper.MergeConfig should have comment or be unexported (golint)
    • Line 1540: warning: exported method Viper.MergeConfigMap should have comment or be unexported (golint)
    • Line 1552: warning: exported method Viper.WriteConfig should have comment or be unexported (golint)
    • Line 1563: warning: exported method Viper.SafeWriteConfig should have comment or be unexported (golint)
    • Line 1573: warning: exported method Viper.WriteConfigAs should have comment or be unexported (golint)
    • Line 1580: warning: exported method Viper.SafeWriteConfigAs should have comment or be unexported (golint)
    • Line 1871: warning: exported method Viper.ReadRemoteConfig should have comment or be unexported (golint)
    • Line 1875: warning: exported function WatchRemoteConfig should have comment or be unexported (golint)
    • Line 1876: warning: exported method Viper.WatchRemoteConfig should have comment or be unexported (golint)
    • Line 1880: warning: exported method Viper.WatchRemoteConfigOnChannel should have comment or be unexported (golint)
    • Line 1957: warning: exported method Viper.AllKeys should have comment or be unexported (golint)
    • Line 2038: warning: exported method Viper.AllSettings should have comment or be unexported (golint)
    • Line 2060: warning: exported method Viper.SetFs should have comment or be unexported (golint)
    • Line 2068: warning: exported method Viper.SetConfigName should have comment or be unexported (golint)
    • Line 2079: warning: exported method Viper.SetConfigType should have comment or be unexported (golint)
    • Line 2088: warning: exported method Viper.SetConfigPermissions should have comment or be unexported (golint)
    • Line 2133: warning: exported method Viper.Debug 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!