Preparing report...

Report for github.com/OpenStars/beego

A+    Excellent!    Found 165 issues across 466 files

Tweet

gofmt95%

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!


golint74%

Golint is a linter for Go source code.

    • beego/client/orm/mock/mock_orm.go
    • Line 22: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 48: warning: comment on exported function MockRead should be of the form "MockRead ..." (golint)
    • beego/core/config/error.go
    • Line 23: warning: error var KeyNotFoundError should have name of the form ErrFoo (golint)
    • Line 24: warning: error var InvalidValueTypeError should have name of the form ErrFoo (golint)
    • beego/core/logs/smtp.go
    • Line 83: warning: exported method SMTPWriter.SetFormatter should have comment or be unexported (golint)
    • Line 135: warning: exported method SMTPWriter.Format should have comment or be unexported (golint)
    • beego/core/berror/error.go
    • Line 28: warning: comment on exported function Error should be of the form "Error ..." (golint)
    • Line 38: warning: exported function Wrap should have comment or be unexported (golint)
    • Line 45: warning: exported function Wrapf should have comment or be unexported (golint)
    • beego/client/httplib/filter/prometheus/filter.go
    • Line 29: warning: exported type FilterChainBuilder should have comment or be unexported (golint)
    • Line 38: warning: exported method FilterChainBuilder.FilterChain should have comment or be unexported (golint)
    • Line 64: warning: context.Context should be the first parameter of a function (golint)
    • beego/client/httplib/mock/mock.go
    • Line 31: warning: exported type Stub should have comment or be unexported (golint)
    • Line 39: warning: exported function InitMockSetting should have comment or be unexported (golint)
    • Line 43: warning: exported function StartMock should have comment or be unexported (golint)
    • Line 47: warning: exported function CtxWithMock should have comment or be unexported (golint)
    • Line 48: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 62: warning: exported type Mock should have comment or be unexported (golint)
    • Line 68: warning: exported function NewMockByPath should have comment or be unexported (golint)
    • Line 72: warning: exported function NewMock should have comment or be unexported (golint)
    • beego/core/config/toml/toml.go
    • Line 29: warning: exported type Config should have comment or be unexported (golint)
    • Line 42: warning: exported method Config.ParseData should have comment or be unexported (golint)
    • Line 84: 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)
    • Line 110: 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)
    • Line 156: 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)
    • Line 175: 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)
    • Line 189: 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)
    • Line 211: 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)
    • Line 247: 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)
    • Line 261: 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)
    • beego/client/orm/types.go
    • Line 27: warning: comment on exported type TableNameI should be of the form "TableNameI ..." (with optional leading article) (golint)
    • Line 98: warning: exported type TxBeginner should have comment or be unexported (golint)
    • Line 112: warning: exported type TxCommitter should have comment or be unexported (golint)
    • Line 117: warning: comment on exported type DML should be of the form "DML ..." (with optional leading article) (golint)
    • Line 158: warning: comment on exported type DQL should be of the form "DQL ..." (with optional leading article) (golint)
    • Line 215: warning: exported type DriverGetter should have comment or be unexported (golint)
    • Line 231: warning: exported type Ormer should have comment or be unexported (golint)
    • Line 236: warning: exported type TxOrmer should have comment or be unexported (golint)
    • beego/core/utils/kv.go
    • Line 17: warning: exported type KV should have comment or be unexported (golint)
    • Line 31: warning: exported method SimpleKV.GetKey should have comment or be unexported (golint)
    • Line 35: warning: exported method SimpleKV.GetValue should have comment or be unexported (golint)
    • beego/adapter/orm/db_alias.go
    • Line 37: warning: exported type DB should have comment or be unexported (golint)
    • Line 39: warning: exported method DB.Begin should have comment or be unexported (golint)
    • Line 43: warning: exported method DB.BeginTx should have comment or be unexported (golint)
    • Line 47: warning: exported method DB.Prepare should have comment or be unexported (golint)
    • Line 51: warning: exported method DB.PrepareContext should have comment or be unexported (golint)
    • Line 55: warning: exported method DB.Exec should have comment or be unexported (golint)
    • Line 59: warning: exported method DB.ExecContext should have comment or be unexported (golint)
    • Line 63: warning: exported method DB.Query should have comment or be unexported (golint)
    • Line 67: warning: exported method DB.QueryContext should have comment or be unexported (golint)
    • Line 71: warning: exported method DB.QueryRow should have comment or be unexported (golint)
    • Line 75: warning: exported method DB.QueryRowContext should have comment or be unexported (golint)
    • beego/core/logs/formatter.go
    • Line 24: warning: exported type LogFormatter should have comment or be unexported (golint)
    • Line 46: warning: exported method PatternLogFormatter.Format should have comment or be unexported (golint)
    • Line 58: warning: exported function GetFormatter should have comment or be unexported (golint)
    • Line 63: warning: comment on exported method PatternLogFormatter.ToString should be of the form "ToString ..." (golint)
    • beego/client/cache/error_code.go
    • Line 21: warning: exported var NilCacheAdapter should have comment or be unexported (golint)
    • Line 26: warning: exported var DuplicateAdapter should have comment or be unexported (golint)
    • Line 31: warning: exported var UnknownAdapter should have comment or be unexported (golint)
    • Line 37: warning: exported var IncrementOverflow should have comment or be unexported (golint)
    • Line 41: warning: exported var DecrementOverflow should have comment or be unexported (golint)
    • Line 45: warning: exported var NotIntegerType should have comment or be unexported (golint)
    • Line 50: warning: exported var InvalidFileCacheDirectoryLevelCfg should have comment or be unexported (golint)
    • Line 55: warning: exported var InvalidFileCacheEmbedExpiryCfg should have comment or be unexported (golint)
    • Line 60: warning: exported var CreateFileCacheDirFailed should have comment or be unexported (golint)
    • Line 66: warning: exported var InvalidFileCachePath should have comment or be unexported (golint)
    • Line 70: warning: exported var ReadFileCacheContentFailed should have comment or be unexported (golint)
    • Line 76: warning: exported var InvalidGobEncodedData should have comment or be unexported (golint)
    • Line 81: warning: exported var GobEncodeDataFailed should have comment or be unexported (golint)
    • Line 87: warning: exported var KeyExpired should have comment or be unexported (golint)
    • Line 93: warning: exported var KeyNotExist should have comment or be unexported (golint)
    • Line 97: warning: exported var MultiGetFailed should have comment or be unexported (golint)
    • Line 101: warning: exported var InvalidMemoryCacheCfg should have comment or be unexported (golint)
    • Line 105: warning: exported var InvalidMemCacheCfg should have comment or be unexported (golint)
    • Line 109: warning: exported var InvalidMemCacheValue should have comment or be unexported (golint)
    • Line 113: warning: exported var InvalidRedisCacheCfg should have comment or be unexported (golint)
    • Line 117: warning: exported var InvalidSsdbCacheCfg should have comment or be unexported (golint)
    • Line 122: warning: exported var InvalidSsdbCacheValue should have comment or be unexported (golint)
    • Line 134: warning: exported var DeleteFileCacheItemFailed should have comment or be unexported (golint)
    • Line 140: warning: exported var MemCacheCurdFailed should have comment or be unexported (golint)
    • Line 148: warning: exported var RedisCacheCurdFailed should have comment or be unexported (golint)
    • Line 159: warning: exported var InvalidConnection should have comment or be unexported (golint)
    • Line 164: warning: exported var DialFailed should have comment or be unexported (golint)
    • Line 168: warning: exported var SsdbCacheCurdFailed should have comment or be unexported (golint)
    • Line 176: warning: exported var SsdbBadResponse should have comment or be unexported (golint)
    • Line 181: warning: exported var ErrKeyExpired should have comment or be unexported (golint)
    • Line 182: warning: exported var ErrKeyNotExist should have comment or be unexported (golint)
    • beego/core/config/global.go
    • Line 31: warning: comment on exported function Set should be of the form "Set ..." (golint)
    • Line 36: warning: comment on exported function String should be of the form "String ..." (golint)
    • Line 41: warning: comment on exported function Strings should be of the form "Strings ..." (golint)
    • Line 45: warning: exported function Int should have comment or be unexported (golint)
    • Line 48: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 51: warning: exported function Bool should have comment or be unexported (golint)
    • Line 54: warning: exported function Float should have comment or be unexported (golint)
    • Line 58: warning: comment on exported function DefaultString should be of the form "DefaultString ..." (golint)
    • Line 63: warning: comment on exported function DefaultStrings should be of the form "DefaultStrings ..." (golint)
    • Line 67: warning: exported function DefaultInt should have comment or be unexported (golint)
    • Line 70: warning: exported function DefaultInt64 should have comment or be unexported (golint)
    • Line 73: warning: exported function DefaultBool should have comment or be unexported (golint)
    • Line 76: warning: exported function DefaultFloat should have comment or be unexported (golint)
    • Line 85: warning: exported function GetSection should have comment or be unexported (golint)
    • Line 89: warning: exported function Unmarshaler should have comment or be unexported (golint)
    • Line 92: warning: exported function Sub should have comment or be unexported (golint)
    • Line 96: warning: exported function OnChange should have comment or be unexported (golint)
    • Line 100: warning: exported function SaveConfigFile should have comment or be unexported (golint)
    • beego/client/httplib/error_code.go
    • Line 21: warning: exported var InvalidUrl should have comment or be unexported (golint)
    • Line 25: warning: exported var InvalidUrlProtocolVersion should have comment or be unexported (golint)
    • Line 31: warning: exported var UnsupportedBodyType should have comment or be unexported (golint)
    • Line 36: warning: exported var InvalidXMLBody should have comment or be unexported (golint)
    • Line 42: warning: exported var InvalidYAMLBody should have comment or be unexported (golint)
    • Line 48: warning: exported var InvalidJSONBody should have comment or be unexported (golint)
    • Line 56: warning: exported var CreateFormFileFailed should have comment or be unexported (golint)
    • Line 61: warning: exported var ReadFileFailed should have comment or be unexported (golint)
    • Line 69: warning: exported var CopyFileFailed should have comment or be unexported (golint)
    • Line 78: warning: exported var CloseFileFailed should have comment or be unexported (golint)
    • Line 82: warning: exported var SendRequestFailed should have comment or be unexported (golint)
    • Line 91: warning: exported var ReadGzipBodyFailed should have comment or be unexported (golint)
    • Line 96: warning: exported var CreateFileIfNotExistFailed should have comment or be unexported (golint)
    • Line 104: warning: exported var UnmarshalJSONResponseToObjectFailed should have comment or be unexported (golint)
    • Line 112: warning: exported var UnmarshalXMLResponseToObjectFailed should have comment or be unexported (golint)
    • Line 120: warning: exported var UnmarshalYAMLResponseToObjectFailed should have comment or be unexported (golint)
    • beego/client/orm/do_nothing_orm.go
    • Line 30: warning: exported type DoNothingOrm should have comment or be unexported (golint)
    • Line 37: warning: exported method DoNothingOrm.ReadWithCtx should have comment or be unexported (golint)
    • Line 41: warning: exported method DoNothingOrm.ReadForUpdate should have comment or be unexported (golint)
    • Line 45: warning: exported method DoNothingOrm.ReadForUpdateWithCtx should have comment or be unexported (golint)
    • Line 49: warning: exported method DoNothingOrm.ReadOrCreate should have comment or be unexported (golint)
    • Line 53: warning: exported method DoNothingOrm.ReadOrCreateWithCtx should have comment or be unexported (golint)
    • Line 57: warning: exported method DoNothingOrm.LoadRelated should have comment or be unexported (golint)
    • Line 61: warning: exported method DoNothingOrm.LoadRelatedWithCtx should have comment or be unexported (golint)
    • Line 65: warning: exported method DoNothingOrm.QueryM2M should have comment or be unexported (golint)
    • Line 69: warning: comment on exported method DoNothingOrm.QueryM2MWithCtx should be of the form "QueryM2MWithCtx ..." (golint)
    • Line 74: warning: exported method DoNothingOrm.QueryTable should have comment or be unexported (golint)
    • Line 78: warning: comment on exported method DoNothingOrm.QueryTableWithCtx should be of the form "QueryTableWithCtx ..." (golint)
    • Line 83: warning: exported method DoNothingOrm.DBStats should have comment or be unexported (golint)
    • Line 87: warning: exported method DoNothingOrm.Insert should have comment or be unexported (golint)
    • Line 91: warning: exported method DoNothingOrm.InsertWithCtx should have comment or be unexported (golint)
    • Line 95: warning: exported method DoNothingOrm.InsertOrUpdate should have comment or be unexported (golint)
    • Line 99: warning: exported method DoNothingOrm.InsertOrUpdateWithCtx should have comment or be unexported (golint)
    • Line 103: warning: exported method DoNothingOrm.InsertMulti should have comment or be unexported (golint)
    • Line 107: warning: exported method DoNothingOrm.InsertMultiWithCtx should have comment or be unexported (golint)
    • Line 111: warning: exported method DoNothingOrm.Update should have comment or be unexported (golint)
    • Line 115: warning: exported method DoNothingOrm.UpdateWithCtx should have comment or be unexported (golint)
    • Line 119: warning: exported method DoNothingOrm.Delete should have comment or be unexported (golint)
    • Line 123: warning: exported method DoNothingOrm.DeleteWithCtx should have comment or be unexported (golint)
    • Line 127: warning: exported method DoNothingOrm.Raw should have comment or be unexported (golint)
    • Line 131: warning: exported method DoNothingOrm.RawWithCtx should have comment or be unexported (golint)
    • Line 135: warning: exported method DoNothingOrm.Driver should have comment or be unexported (golint)
    • Line 139: warning: exported method DoNothingOrm.Begin should have comment or be unexported (golint)
    • Line 143: warning: exported method DoNothingOrm.BeginWithCtx should have comment or be unexported (golint)
    • Line 147: warning: exported method DoNothingOrm.BeginWithOpts should have comment or be unexported (golint)
    • Line 151: warning: exported method DoNothingOrm.BeginWithCtxAndOpts should have comment or be unexported (golint)
    • Line 155: warning: exported method DoNothingOrm.DoTx should have comment or be unexported (golint)
    • Line 159: warning: exported method DoNothingOrm.DoTxWithCtx should have comment or be unexported (golint)
    • Line 163: warning: exported method DoNothingOrm.DoTxWithOpts should have comment or be unexported (golint)
    • Line 167: warning: exported method DoNothingOrm.DoTxWithCtxAndOpts should have comment or be unexported (golint)
    • Line 176: warning: exported method DoNothingTxOrm.Commit should have comment or be unexported (golint)
    • Line 180: warning: exported method DoNothingTxOrm.Rollback should have comment or be unexported (golint)
    • beego/client/orm/db_alias.go
    • Line 108: warning: exported type DB should have comment or be unexported (golint)
    • Line 118: warning: exported method DB.Begin should have comment or be unexported (golint)
    • Line 122: warning: exported method DB.BeginTx should have comment or be unexported (golint)
    • Line 158: warning: exported method DB.Prepare should have comment or be unexported (golint)
    • Line 162: warning: exported method DB.PrepareContext should have comment or be unexported (golint)
    • Line 166: warning: exported method DB.Exec should have comment or be unexported (golint)
    • Line 170: warning: exported method DB.ExecContext should have comment or be unexported (golint)
    • Line 184: warning: exported method DB.Query should have comment or be unexported (golint)
    • Line 188: warning: exported method DB.QueryContext should have comment or be unexported (golint)
    • Line 202: warning: exported method DB.QueryRow should have comment or be unexported (golint)
    • Line 206: warning: exported method DB.QueryRowContext should have comment or be unexported (golint)
    • Line 220: warning: exported type TxDB should have comment or be unexported (golint)
    • Line 227: warning: exported method TxDB.Commit should have comment or be unexported (golint)
    • Line 231: warning: exported method TxDB.Rollback should have comment or be unexported (golint)
    • Line 238: warning: exported method TxDB.Prepare should have comment or be unexported (golint)
    • Line 242: warning: exported method TxDB.PrepareContext should have comment or be unexported (golint)
    • Line 246: warning: exported method TxDB.Exec should have comment or be unexported (golint)
    • Line 250: warning: exported method TxDB.ExecContext should have comment or be unexported (golint)
    • Line 254: warning: exported method TxDB.Query should have comment or be unexported (golint)
    • Line 258: warning: exported method TxDB.QueryContext should have comment or be unexported (golint)
    • Line 262: warning: exported method TxDB.QueryRow should have comment or be unexported (golint)
    • Line 266: warning: exported method TxDB.QueryRowContext should have comment or be unexported (golint)
    • Line 378: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 558: warning: exported type DBOption should have comment or be unexported (golint)
    • beego/client/orm/mock/mock_rawSetter.go
    • Line 23: warning: exported type DoNothingRawSetter should have comment or be unexported (golint)
    • Line 26: warning: exported method DoNothingRawSetter.Exec should have comment or be unexported (golint)
    • Line 30: warning: exported method DoNothingRawSetter.QueryRow should have comment or be unexported (golint)
    • Line 34: warning: exported method DoNothingRawSetter.QueryRows should have comment or be unexported (golint)
    • Line 38: warning: exported method DoNothingRawSetter.SetArgs should have comment or be unexported (golint)
    • Line 42: warning: exported method DoNothingRawSetter.Values should have comment or be unexported (golint)
    • Line 46: warning: exported method DoNothingRawSetter.ValuesList should have comment or be unexported (golint)
    • Line 50: warning: exported method DoNothingRawSetter.ValuesFlat should have comment or be unexported (golint)
    • Line 54: warning: exported method DoNothingRawSetter.RowsToMap should have comment or be unexported (golint)
    • Line 58: warning: exported method DoNothingRawSetter.RowsToStruct should have comment or be unexported (golint)
    • Line 62: warning: exported method DoNothingRawSetter.Prepare should have comment or be unexported (golint)
    • beego/core/config/yaml/yaml.go
    • Line 142: warning: exported method ConfigContainer.Sub should have comment or be unexported (golint)
    • Line 166: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 174: warning: exported method ConfigContainer.OnChange should have comment or be unexported (golint)
    • beego/core/logs/slack.go
    • Line 27: warning: exported method SLACKWriter.Format should have comment or be unexported (golint)
    • Line 32: warning: exported method SLACKWriter.SetFormatter should have comment or be unexported (golint)
    • beego/client/orm/hints/db_hints.go
    • Line 22: warning: comment on exported const KeyForceIndex should be of the form "KeyForceIndex ..." (golint)
    • Line 24: warning: exported const KeyUseIndex should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type Hint should have comment or be unexported (golint)
    • beego/core/logs/jianliao.go
    • Line 46: warning: exported method JLWriter.Format should have comment or be unexported (golint)
    • Line 52: warning: exported method JLWriter.SetFormatter should have comment or be unexported (golint)
    • beego/core/config/json/json.go
    • Line 79: warning: exported method JSONConfigContainer.Unmarshaler should have comment or be unexported (golint)
    • Line 87: warning: exported method JSONConfigContainer.Sub should have comment or be unexported (golint)
    • Line 103: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 108: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 113: warning: exported method JSONConfigContainer.OnChange should have comment or be unexported (golint)
    • beego/server/web/filter.go
    • Line 116: warning: exported type FilterOpt should have comment or be unexported (golint)
    • Line 118: warning: exported function WithReturnOnOutput should have comment or be unexported (golint)
    • Line 124: warning: exported function WithResetParams should have comment or be unexported (golint)
    • Line 130: warning: exported function WithCaseSensitive should have comment or be unexported (golint)
    • beego/server/web/fs.go
    • Line 9: warning: exported type FileSystem should have comment or be unexported (golint)
    • Line 12: warning: exported method FileSystem.Open should have comment or be unexported (golint)
    • beego/client/orm/mock/mock_queryM2Mer.go
    • Line 28: warning: exported method DoNothingQueryM2Mer.AddWithCtx should have comment or be unexported (golint)
    • Line 32: warning: exported method DoNothingQueryM2Mer.RemoveWithCtx should have comment or be unexported (golint)
    • Line 36: warning: exported method DoNothingQueryM2Mer.ExistWithCtx should have comment or be unexported (golint)
    • Line 40: warning: exported method DoNothingQueryM2Mer.ClearWithCtx should have comment or be unexported (golint)
    • Line 44: warning: exported method DoNothingQueryM2Mer.CountWithCtx should have comment or be unexported (golint)
    • Line 48: warning: exported method DoNothingQueryM2Mer.Add should have comment or be unexported (golint)
    • Line 52: warning: exported method DoNothingQueryM2Mer.Remove should have comment or be unexported (golint)
    • Line 56: warning: exported method DoNothingQueryM2Mer.Exist should have comment or be unexported (golint)
    • Line 60: warning: exported method DoNothingQueryM2Mer.Clear should have comment or be unexported (golint)
    • Line 64: warning: exported method DoNothingQueryM2Mer.Count should have comment or be unexported (golint)
    • Line 68: warning: exported type QueryM2MerCondition should have comment or be unexported (golint)
    • Line 73: warning: exported function NewQueryM2MerCondition should have comment or be unexported (golint)
    • Line 80: warning: exported method QueryM2MerCondition.Match should have comment or be unexported (golint)
    • beego/core/bean/tag_auto_wire_bean_factory.go
    • Line 28: warning: exported const DefaultValueTagKey should have comment or be unexported (golint)
    • Line 98: 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)
    • Line 188: 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)
    • Line 199: 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)
    • Line 210: 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)
    • beego/adapter/validation/util.go
    • Line 27: warning: exported const LabelTag should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported var ErrInt64On32 should have comment or be unexported (golint)
    • beego/core/config/xml/xml.go
    • Line 97: warning: exported method ConfigContainer.Sub should have comment or be unexported (golint)
    • Line 115: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 119: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 124: warning: exported method ConfigContainer.OnChange should have comment or be unexported (golint)
    • beego/core/logs/es/es.go
    • Line 86: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 119: warning: exported type LogDocument should have comment or be unexported (golint)
    • beego/client/orm/mock/mock_querySetter.go
    • Line 29: warning: exported method DoNothingQuerySetter.OrderClauses should have comment or be unexported (golint)
    • Line 33: warning: exported method DoNothingQuerySetter.CountWithCtx should have comment or be unexported (golint)
    • Line 37: warning: exported method DoNothingQuerySetter.ExistWithCtx should have comment or be unexported (golint)
    • Line 41: warning: exported method DoNothingQuerySetter.UpdateWithCtx should have comment or be unexported (golint)
    • Line 45: warning: exported method DoNothingQuerySetter.DeleteWithCtx should have comment or be unexported (golint)
    • Line 49: warning: exported method DoNothingQuerySetter.PrepareInsertWithCtx should have comment or be unexported (golint)
    • Line 53: warning: exported method DoNothingQuerySetter.AllWithCtx should have comment or be unexported (golint)
    • Line 57: warning: exported method DoNothingQuerySetter.OneWithCtx should have comment or be unexported (golint)
    • Line 61: warning: exported method DoNothingQuerySetter.ValuesWithCtx should have comment or be unexported (golint)
    • Line 65: warning: exported method DoNothingQuerySetter.ValuesListWithCtx should have comment or be unexported (golint)
    • Line 69: warning: exported method DoNothingQuerySetter.ValuesFlatWithCtx should have comment or be unexported (golint)
    • Line 73: warning: exported method DoNothingQuerySetter.Aggregate should have comment or be unexported (golint)
    • Line 77: warning: exported method DoNothingQuerySetter.Filter should have comment or be unexported (golint)
    • Line 81: warning: exported method DoNothingQuerySetter.FilterRaw should have comment or be unexported (golint)
    • Line 85: warning: exported method DoNothingQuerySetter.Exclude should have comment or be unexported (golint)
    • Line 89: warning: exported method DoNothingQuerySetter.SetCond should have comment or be unexported (golint)
    • Line 93: warning: exported method DoNothingQuerySetter.GetCond should have comment or be unexported (golint)
    • Line 97: warning: exported method DoNothingQuerySetter.Limit should have comment or be unexported (golint)
    • Line 101: warning: exported method DoNothingQuerySetter.Offset should have comment or be unexported (golint)
    • Line 105: warning: exported method DoNothingQuerySetter.GroupBy should have comment or be unexported (golint)
    • Line 109: warning: exported method DoNothingQuerySetter.OrderBy should have comment or be unexported (golint)
    • Line 113: warning: exported method DoNothingQuerySetter.ForceIndex should have comment or be unexported (golint)
    • Line 117: warning: exported method DoNothingQuerySetter.UseIndex should have comment or be unexported (golint)
    • Line 121: warning: exported method DoNothingQuerySetter.IgnoreIndex should have comment or be unexported (golint)
    • Line 125: warning: exported method DoNothingQuerySetter.RelatedSel should have comment or be unexported (golint)
    • Line 129: warning: exported method DoNothingQuerySetter.Distinct should have comment or be unexported (golint)
    • Line 133: warning: exported method DoNothingQuerySetter.ForUpdate should have comment or be unexported (golint)
    • Line 137: warning: exported method DoNothingQuerySetter.Count should have comment or be unexported (golint)
    • Line 141: warning: exported method DoNothingQuerySetter.Exist should have comment or be unexported (golint)
    • Line 145: warning: exported method DoNothingQuerySetter.Update should have comment or be unexported (golint)
    • Line 149: warning: exported method DoNothingQuerySetter.Delete should have comment or be unexported (golint)
    • Line 153: warning: exported method DoNothingQuerySetter.PrepareInsert should have comment or be unexported (golint)
    • Line 157: warning: exported method DoNothingQuerySetter.All should have comment or be unexported (golint)
    • Line 161: warning: exported method DoNothingQuerySetter.One should have comment or be unexported (golint)
    • Line 165: warning: exported method DoNothingQuerySetter.Values should have comment or be unexported (golint)
    • Line 169: warning: exported method DoNothingQuerySetter.ValuesList should have comment or be unexported (golint)
    • Line 173: warning: exported method DoNothingQuerySetter.ValuesFlat should have comment or be unexported (golint)
    • Line 177: warning: exported method DoNothingQuerySetter.RowsToMap should have comment or be unexported (golint)
    • Line 181: warning: exported method DoNothingQuerySetter.RowsToStruct should have comment or be unexported (golint)
    • beego/client/orm/db.go
    • Line 496: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 604: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • beego/client/httplib/mock/mock_condition.go
    • Line 26: warning: exported type RequestCondition should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type SimpleCondition should be of the form "SimpleCondition ..." (with optional leading article) (golint)
    • Line 46: warning: exported function NewSimpleCondition should have comment or be unexported (golint)
    • Line 59: warning: exported method SimpleCondition.Match should have comment or be unexported (golint)
    • Line 148: warning: exported function WithPathReg should have comment or be unexported (golint)
    • Line 154: warning: exported function WithQuery should have comment or be unexported (golint)
    • Line 160: warning: exported function WithHeader should have comment or be unexported (golint)
    • Line 166: warning: exported function WithJsonBodyFields should have comment or be unexported (golint)
    • Line 172: warning: exported function WithMethod should have comment or be unexported (golint)
    • beego/adapter/fs.go
    • Line 24: warning: exported type FileSystem should have comment or be unexported (golint)
    • Line 26: warning: exported method FileSystem.Open should have comment or be unexported (golint)
    • beego/client/cache/redis/redis.go
    • Line 47: warning: comment on exported var DefaultKey should be of the form "DefaultKey ..." (golint)
    • Line 95: 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)
    • beego/client/httplib/mock/mock_filter.go
    • Line 24: warning: comment on exported type MockResponseFilter should be of the form "MockResponseFilter ..." (with optional leading article) (golint)
    • Line 30: warning: exported function NewMockResponseFilter should have comment or be unexported (golint)
    • Line 36: warning: exported method MockResponseFilter.FilterChain should have comment or be unexported (golint)
    • Line 49: warning: exported method MockResponseFilter.MockByPath should have comment or be unexported (golint)
    • Line 53: warning: exported method MockResponseFilter.Clear should have comment or be unexported (golint)
    • beego/client/orm/mock/condition.go
    • Line 23: warning: exported type Mock should have comment or be unexported (golint)
    • Line 29: warning: exported function NewMock should have comment or be unexported (golint)
    • Line 37: warning: exported type Condition should have comment or be unexported (golint)
    • Line 41: warning: exported type SimpleCondition should have comment or be unexported (golint)
    • Line 46: warning: exported function NewSimpleCondition should have comment or be unexported (golint)
    • Line 53: warning: exported method SimpleCondition.Match should have comment or be unexported (golint)
    • beego/client/httplib/httplib.go
    • Line 435: warning: exported method BeegoHTTPRequest.DoRequestWithCtx should have comment or be unexported (golint)
    • Line 673: warning: exported function TimeoutDialerCtx should have comment or be unexported (golint)
    • beego/client/orm/mock/mock.go
    • Line 29: warning: exported type Stub should have comment or be unexported (golint)
    • Line 34: warning: exported type OrmStub should have comment or be unexported (golint)
    • Line 38: warning: exported function StartMock should have comment or be unexported (golint)
    • Line 48: warning: exported method OrmStub.Mock should have comment or be unexported (golint)
    • Line 52: warning: exported method OrmStub.Clear should have comment or be unexported (golint)
    • Line 56: warning: exported method OrmStub.FilterChain should have comment or be unexported (golint)
    • beego/server/web/server.go
    • Line 275: warning: exported function RouterWithOpts should have comment or be unexported (golint)
    • Line 299: warning: exported method HttpServer.RouterWithOpts should have comment or be unexported (golint)
    • Line 762: warning: comment on exported function InsertFilter should be of the form "InsertFilter ..." (golint)
    • Line 801: warning: exported method HttpServer.LogAccess should have comment or be unexported (golint)
    • beego/server/web/session/session_config.go
    • Line 24: warning: exported method ManagerConfig.Opts should have comment or be unexported (golint)
    • Line 30: warning: exported type ManagerConfigOpt should have comment or be unexported (golint)
    • Line 32: warning: exported function NewManagerConfig should have comment or be unexported (golint)
    • Line 47: warning: comment on exported function CfgSessionIdLength should be of the form "CfgSessionIdLength ..." (golint)
    • Line 82: warning: comment on exported function CfgCookieLifeTime should be of the form "CfgCookieLifeTime ..." (golint)
    • Line 117: warning: comment on exported function CfgEnableSidInURLQuery should be of the form "CfgEnableSidInURLQuery ..." (golint)
    • Line 124: warning: comment on exported function CfgHTTPOnly should be of the form "CfgHTTPOnly ..." (golint)
    • beego/server/web/router.go
    • Line 127: warning: exported type ControllerOption should have comment or be unexported (golint)
    • Line 129: warning: exported method ControllerInfo.GetPattern should have comment or be unexported (golint)
    • Line 133: warning: exported function WithRouterMethods should have comment or be unexported (golint)
    • Line 139: warning: exported function WithRouterSessionOn should have comment or be unexported (golint)
    • Line 176: warning: exported function NewControllerRegisterWithCfg should have comment or be unexported (golint)
    • beego/adapter/session/store_adapter.go
    • Line 24: warning: exported type NewToOldStoreAdapter should have comment or be unexported (golint)
    • Line 28: warning: exported function CreateNewToOldStoreAdapter should have comment or be unexported (golint)
    • Line 34: warning: exported method NewToOldStoreAdapter.Set should have comment or be unexported (golint)
    • Line 38: warning: exported method NewToOldStoreAdapter.Get should have comment or be unexported (golint)
    • Line 42: warning: exported method NewToOldStoreAdapter.Delete should have comment or be unexported (golint)
    • Line 46: warning: exported method NewToOldStoreAdapter.SessionID should have comment or be unexported (golint)
    • Line 50: warning: exported method NewToOldStoreAdapter.SessionRelease should have comment or be unexported (golint)
    • Line 54: warning: exported method NewToOldStoreAdapter.Flush should have comment or be unexported (golint)
    • beego/task/govenor_command.go
    • Line 80: 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)
    • beego/core/admin/command.go
    • Line 29: warning: error var CommandNotFound should have name of the form ErrFoo (golint)
    • Line 29: warning: exported var CommandNotFound should have comment or be unexported (golint)
    • Line 31: warning: exported type Result should have comment or be unexported (golint)
    • Line 38: warning: exported method Result.IsSuccess should have comment or be unexported (golint)
    • Line 76: warning: exported function GetCommand should have comment or be unexported (golint)
    • beego/core/config/config.go
    • Line 87: warning: exported type BaseConfiger should have comment or be unexported (golint)
    • Line 92: warning: exported function NewBaseConfiger should have comment or be unexported (golint)
    • Line 98: warning: exported method BaseConfiger.Int should have comment or be unexported (golint)
    • Line 106: warning: exported method BaseConfiger.Int64 should have comment or be unexported (golint)
    • Line 114: warning: exported method BaseConfiger.Bool should have comment or be unexported (golint)
    • Line 122: warning: exported method BaseConfiger.Float should have comment or be unexported (golint)
    • Line 148: warning: exported method BaseConfiger.DefaultInt should have comment or be unexported (golint)
    • Line 155: warning: exported method BaseConfiger.DefaultInt64 should have comment or be unexported (golint)
    • Line 162: warning: exported method BaseConfiger.DefaultBool should have comment or be unexported (golint)
    • Line 168: warning: exported method BaseConfiger.DefaultFloat should have comment or be unexported (golint)
    • Line 189: warning: exported method BaseConfiger.Sub should have comment or be unexported (golint)
    • Line 193: warning: exported method BaseConfiger.OnChange should have comment or be unexported (golint)
    • Line 371: warning: exported type DecodeOption should have comment or be unexported (golint)
    • beego/client/orm/filter_orm_decorator.go
    • Line 28: warning: exported const TxNameKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported function NewFilterOrmDecorator should have comment or be unexported (golint)
    • Line 62: warning: exported function NewFilterTxOrmDecorator should have comment or be unexported (golint)
    • beego/client/orm/clauses/order_clause/order.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported type Sort should have comment or be unexported (golint)
    • Line 12: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Option should have comment or be unexported (golint)
    • Line 19: warning: exported type Order should have comment or be unexported (golint)
    • Line 25: warning: exported function Clause should have comment or be unexported (golint)
    • Line 34: warning: exported method Order.GetColumn should have comment or be unexported (golint)
    • Line 38: warning: exported method Order.GetSort should have comment or be unexported (golint)
    • Line 42: warning: exported method Order.SortString should have comment or be unexported (golint)
    • Line 53: warning: exported method Order.IsRaw should have comment or be unexported (golint)
    • Line 57: warning: exported function ParseOrder should have comment or be unexported (golint)
    • Line 76: warning: exported function Column should have comment or be unexported (golint)
    • Line 88: warning: exported function SortAscending should have comment or be unexported (golint)
    • Line 92: warning: exported function SortDescending should have comment or be unexported (golint)
    • Line 96: warning: exported function SortNone should have comment or be unexported (golint)
    • Line 100: warning: exported function Raw should have comment or be unexported (golint)
    • beego/core/config/etcd/config.go
    • Line 33: warning: exported type EtcdConfiger should have comment or be unexported (golint)
    • Line 94: warning: exported method EtcdConfiger.SaveConfigFile should have comment or be unexported (golint)
    • Line 120: warning: comment on exported method EtcdConfiger.OnChange should be of the form "OnChange ..." (golint)
    • Line 150: warning: exported type EtcdConfigerProvider should have comment or be unexported (golint)

gocyclo90%

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.

    • beego/core/utils/debug.go
    • Line 164: warning: cyclomatic complexity 54 of function printKeyValue() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 17 of function PrintPointerInfo() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 17 of function isSimpleType() is high (> 15) (gocyclo)
    • beego/client/orm/db.go
    • Line 1442: warning: cyclomatic complexity 73 of function (*dbBase).setFieldValue() is high (> 15) (gocyclo)
    • Line 1277: warning: cyclomatic complexity 57 of function (*dbBase).convertValueFromDB() is high (> 15) (gocyclo)
    • Line 123: warning: cyclomatic complexity 51 of function (*dbBase).collectFieldValue() is high (> 15) (gocyclo)
    • Line 936: warning: cyclomatic complexity 47 of function (*dbBase).ReadBatch() is high (> 15) (gocyclo)
    • Line 1634: warning: cyclomatic complexity 31 of function (*dbBase).ReadValues() is high (> 15) (gocyclo)
    • Line 511: warning: cyclomatic complexity 22 of function (*dbBase).InsertOrUpdate() is high (> 15) (gocyclo)
    • Line 742: warning: cyclomatic complexity 20 of function (*dbBase).UpdateBatch() is high (> 15) (gocyclo)
    • Line 1190: warning: cyclomatic complexity 18 of function (*dbBase).GenerateOperatorSQL() is high (> 15) (gocyclo)
    • beego/core/config/ini.go
    • Line 66: warning: cyclomatic complexity 37 of function (*IniConfig).parseData() is high (> 15) (gocyclo)
    • Line 350: warning: cyclomatic complexity 24 of function (*IniConfigContainer).SaveConfigFile() is high (> 15) (gocyclo)
    • beego/client/orm/models.go
    • Line 117: warning: cyclomatic complexity 58 of function (*_modelCache).bootstrap() is high (> 15) (gocyclo)
    • Line 417: warning: cyclomatic complexity 30 of function (*_modelCache).getDbCreateSQL() is high (> 15) (gocyclo)
    • beego/server/web/router.go
    • Line 956: warning: cyclomatic complexity 79 of function (*ControllerRegister).serveHttp() is high (> 15) (gocyclo)
    • Line 823: warning: cyclomatic complexity 40 of function (*ControllerRegister).getURL() is high (> 15) (gocyclo)
    • beego/server/web/tree.go
    • Line 295: warning: cyclomatic complexity 37 of function (*Tree).match() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 31 of function (*Tree).addtree() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 25 of function splitSegment() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 23 of function (*Tree).addseg() is high (> 15) (gocyclo)
    • Line 396: warning: cyclomatic complexity 20 of function (*leafInfo).match() is high (> 15) (gocyclo)
    • beego/client/orm/orm_raw.go
    • Line 90: warning: cyclomatic complexity 38 of function (*rawSet).setFieldValue() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 34 of function (*rawSet).QueryRows() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 31 of function (*rawSet).QueryRow() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 27 of function (*rawSet).readValues() is high (> 15) (gocyclo)
    • Line 748: warning: cyclomatic complexity 24 of function (*rawSet).queryRowsTo() is high (> 15) (gocyclo)

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!