Preparing report...

Report for github.com/fandypeng/excel2config

A    Great!    Found 36 issues across 51 files

Tweet

gofmt86%

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.


golint33%

Golint is a linter for Go source code.

    • excel2config/internal/service/sheet.go
    • Line 17: warning: exported method Service.ExcelList should have comment or be unexported (golint)
    • Line 43: warning: exported method Service.CreateExcel should have comment or be unexported (golint)
    • Line 66: warning: exported method Service.LoadExcel should have comment or be unexported (golint)
    • Line 78: warning: exported method Service.LoadExcelSheet should have comment or be unexported (golint)
    • Line 91: warning: exported method Service.UpdateExcel should have comment or be unexported (golint)
    • Line 100: warning: exported method Service.DeleteExcel should have comment or be unexported (golint)
    • Line 125: warning: exported method Service.ExportExcel should have comment or be unexported (golint)
    • Line 178: warning: exported method Service.SheetList should have comment or be unexported (golint)
    • Line 194: warning: exported method Service.ExportAllSheets should have comment or be unexported (golint)
    • excel2config/internal/model/user.go
    • Line 3: warning: exported type Token should have comment or be unexported (golint)
    • Line 8: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 19: warning: exported type SimpleUserInfo should have comment or be unexported (golint)
    • excel2config/internal/model/flexint.go
    • Line 8: warning: comment on exported type FlexInt should be of the form "FlexInt ..." (with optional leading article) (golint)
    • Line 12: warning: exported method FlexInt.UnmarshalJSON should have comment or be unexported (golint)
    • Line 34: warning: comment on exported type FlexFloat should be of the form "FlexFloat ..." (with optional leading article) (golint)
    • Line 38: warning: exported method FlexFloat.UnmarshalJSON should have comment or be unexported (golint)
    • excel2config/internal/pkg/gzip/options.go
    • Line 13: warning: exported var DefaultExcludedExtentions should have comment or be unexported (golint)
    • Line 21: warning: exported type Options should have comment or be unexported (golint)
    • Line 28: warning: exported type Option should have comment or be unexported (golint)
    • Line 30: warning: exported function WithExcludedExtensions should have comment or be unexported (golint)
    • Line 36: warning: exported function WithExcludedPaths should have comment or be unexported (golint)
    • Line 42: warning: exported function WithExcludedPathsRegexs should have comment or be unexported (golint)
    • Line 48: warning: exported function WithDecompressFn should have comment or be unexported (golint)
    • Line 54: warning: comment on exported type ExcludedExtensions should be of the form "ExcludedExtensions ..." (with optional leading article) (golint)
    • Line 57: warning: exported function NewExcludedExtensions should have comment or be unexported (golint)
    • Line 65: warning: exported method ExcludedExtensions.Contains should have comment or be unexported (golint)
    • Line 70: warning: exported type ExcludedPaths should have comment or be unexported (golint)
    • Line 72: warning: exported function NewExcludedPaths should have comment or be unexported (golint)
    • Line 76: warning: exported method ExcludedPaths.Contains should have comment or be unexported (golint)
    • Line 85: warning: exported type ExcludedPathesRegexs should have comment or be unexported (golint)
    • Line 87: warning: exported function NewExcludedPathesRegexs should have comment or be unexported (golint)
    • Line 95: warning: exported method ExcludedPathesRegexs.Contains should have comment or be unexported (golint)
    • Line 104: warning: exported function DefaultDecompressHandle should have comment or be unexported (golint)
    • excel2config/internal/helper/tools.go
    • Line 14: warning: exported function ParseRedisDsn should have comment or be unexported (golint)
    • Line 34: warning: exported function ParseMysqlDsn should have comment or be unexported (golint)
    • Line 50: warning: exported function GenerateRandomStr should have comment or be unexported (golint)
    • Line 58: warning: exported function GetIntroduceCellData should have comment or be unexported (golint)
    • Line 65: warning: exported function GetIntroduceSheetConfig should have comment or be unexported (golint)
    • Line 72: warning: exported function GetSheetInitCellData should have comment or be unexported (golint)
    • excel2config/internal/server/ws/clientmgr.go
    • Line 9: warning: exported type ClientMgr should have comment or be unexported (golint)
    • Line 14: warning: exported method ClientMgr.AddClient should have comment or be unexported (golint)
    • Line 27: warning: exported method ClientMgr.DelClient should have comment or be unexported (golint)
    • Line 36: warning: exported method ClientMgr.Send2AllClients should have comment or be unexported (golint)
    • excel2config/internal/server/sessions/sessions.go
    • Line 13: warning: exported const DefaultKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Store should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type Session should be of the form "Session ..." (with optional leading article) (golint)
    • Line 47: warning: exported function Sessions should have comment or be unexported (golint)
    • Line 56: warning: exported function SessionsMany should have comment or be unexported (golint)
    • Line 137: warning: comment on exported function Default should be of the form "Default ..." (golint)
    • Line 146: warning: comment on exported function DefaultMany should be of the form "DefaultMany ..." (golint)
    • excel2config/internal/dao/dao.go
    • Line 20: warning: exported var Provider should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type Dao should be of the form "Dao ..." (with optional leading article) (golint)
    • excel2config/internal/model/sheet.go
    • Line 3: warning: exported type MergeCell should have comment or be unexported (golint)
    • Line 10: warning: exported type PS should have comment or be unexported (golint)
    • Line 19: warning: exported type CellType should have comment or be unexported (golint)
    • Line 34: warning: exported type CellValue should have comment or be unexported (golint)
    • Line 55: warning: exported type Cell should have comment or be unexported (golint)
    • Line 61: warning: exported type BorderValueStyle should have comment or be unexported (golint)
    • Line 66: warning: exported type Border should have comment or be unexported (golint)
    • Line 85: warning: exported type ConfigMerge should have comment or be unexported (golint)
    • Line 92: warning: exported type SheetConfig should have comment or be unexported (golint)
    • Line 110: warning: exported type Filter should have comment or be unexported (golint)
    • Line 125: warning: exported type FilterSelect should have comment or be unexported (golint)
    • Line 140: warning: exported type SelectSave should have comment or be unexported (golint)
    • Line 155: warning: exported type AlternateFormatSave should have comment or be unexported (golint)
    • Line 182: warning: exported type AlternateFormatSaveModelCustom should have comment or be unexported (golint)
    • Line 187: warning: exported type ConditionFormatSave should have comment or be unexported (golint)
    • Line 202: warning: exported type Frozen should have comment or be unexported (golint)
    • Line 210: warning: exported type Chart should have comment or be unexported (golint)
    • Line 643: warning: exported type Image should have comment or be unexported (golint)
    • Line 671: warning: exported type PivotTable should have comment or be unexported (golint)
    • Line 701: warning: exported type CalcChain should have comment or be unexported (golint)
    • Line 712: warning: exported type DynamicArray should have comment or be unexported (golint)
    • excel2config/internal/service/auth/auth.go
    • Line 16: warning: exported function NewAuthService should have comment or be unexported (golint)
    • Line 20: warning: exported type Service should have comment or be unexported (golint)
    • Line 24: warning: exported method Service.NeedLogin should have comment or be unexported (golint)
    • Line 54: warning: exported method Service.WsNeedLogin should have comment or be unexported (golint)
    • Line 58: warning: exported method Service.NeedAuthorization should have comment or be unexported (golint)
    • Line 62: warning: exported method Service.CORS should have comment or be unexported (golint)
    • excel2config/internal/service/group.go
    • Line 26: warning: exported method Service.GroupList should have comment or be unexported (golint)
    • Line 50: warning: comment on exported method Service.GroupAdd should be of the form "GroupAdd ..." (golint)
    • Line 99: warning: exported method Service.GroupUpdate should have comment or be unexported (golint)
    • Line 174: warning: exported method Service.TestConnection should have comment or be unexported (golint)
    • Line 237: warning: exported method Service.ExportConfigToDB should have comment or be unexported (golint)
    • Line 398: warning: exported method Service.GetConfigFromDB should have comment or be unexported (golint)
    • Line 451: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 512: warning: exported method Service.GenerateAppKeySecret should have comment or be unexported (golint)
    • Line 559: warning: exported method Service.ExportRecord should have comment or be unexported (golint)
    • Line 579: warning: exported method Service.ExportRecordContent should have comment or be unexported (golint)
    • Line 599: warning: exported method Service.ExportRollback should have comment or be unexported (golint)
    • excel2config/internal/model/model.go
    • Line 17: warning: exported type Article should have comment or be unexported (golint)
    • Line 23: warning: exported type Sheet should have comment or be unexported (golint)
    • Line 55: warning: exported type Excel should have comment or be unexported (golint)
    • Line 66: warning: exported type ExportRecord should have comment or be unexported (golint)
    • Line 76: warning: exported type FormatSheet should have comment or be unexported (golint)
    • Line 83: warning: exported method Sheet.Format should have comment or be unexported (golint)
    • Line 120: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 181: warning: exported function IsEmptyCell should have comment or be unexported (golint)
    • Line 191: warning: exported function IsInlineCell should have comment or be unexported (golint)
    • excel2config/api/router.go
    • Line 7: warning: exported function RegisterUser should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function RegisterGroup should be of the form "RegisterGroup ..." (golint)
    • Line 41: warning: comment on exported function RegisterSheet should be of the form "RegisterSheet ..." (golint)
    • excel2config/internal/model/update.go
    • Line 3: warning: exported type UpdateV should have comment or be unexported (golint)
    • Line 9: warning: exported type UpdateRV should have comment or be unexported (golint)
    • Line 19: warning: exported type UpdateCG should have comment or be unexported (golint)
    • Line 26: warning: exported type UpdateCommon should have comment or be unexported (golint)
    • Line 33: warning: exported type UpdateCalcChain should have comment or be unexported (golint)
    • Line 41: warning: exported type UpdateRowColumn should have comment or be unexported (golint)
    • Line 51: warning: exported type UpdateFilter should have comment or be unexported (golint)
    • Line 57: warning: exported type FilterValue should have comment or be unexported (golint)
    • Line 62: warning: exported type AddSheet should have comment or be unexported (golint)
    • Line 68: warning: exported type CopySheet should have comment or be unexported (golint)
    • Line 77: warning: exported type DeleteSheet should have comment or be unexported (golint)
    • Line 85: warning: exported type RecoverSheet should have comment or be unexported (golint)
    • Line 93: warning: exported type UpdateSheetOrder should have comment or be unexported (golint)
    • Line 99: warning: exported type ToggleSheet should have comment or be unexported (golint)
    • Line 105: warning: exported type HideOrShowSheet should have comment or be unexported (golint)
    • excel2config/internal/service/user.go
    • Line 24: warning: exported method Service.Login should have comment or be unexported (golint)
    • Line 215: warning: exported method Service.Register should have comment or be unexported (golint)
    • Line 249: warning: exported method Service.Logout should have comment or be unexported (golint)
    • Line 263: warning: exported method Service.Info should have comment or be unexported (golint)
    • Line 282: warning: exported method Service.Search should have comment or be unexported (golint)
    • excel2config/internal/def/const.go
    • Line 3: warning: exported const PasswdSalt should have comment or be unexported (golint)
    • Line 5: warning: exported type ErrorCode should have comment or be unexported (golint)
    • Line 37: warning: exported const DaySeconds should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported const DefaultIntroductionSheet should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: exported const DsnTypeRedis should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported const RoleTypeAdmin should have comment (or a comment on this block) or be unexported (golint)
    • excel2config/api/sheet.go
    • Line 9: warning: exported function LoadExcel should have comment or be unexported (golint)
    • Line 22: warning: exported function LoadExcelSheet should have comment or be unexported (golint)
    • excel2config/internal/server/ws/client.go
    • Line 30: warning: exported type Client should have comment or be unexported (golint)
    • Line 42: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 97: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 107: warning: exported method Client.GetUid should have comment or be unexported (golint)
    • Line 111: warning: exported method Client.GetName should have comment or be unexported (golint)
    • excel2config/internal/pkg/dingtalk/corp.go
    • Line 7: warning: exported type Dingtalk should have comment or be unexported (golint)
    • Line 13: warning: exported function New should have comment or be unexported (golint)
    • Line 42: warning: exported method Dingtalk.GetAccessToken should have comment or be unexported (golint)
    • Line 54: warning: exported method Dingtalk.GetUserInfo should have comment or be unexported (golint)
    • Line 61: warning: exported method Dingtalk.GetUserDetail should have comment or be unexported (golint)
    • Line 68: warning: exported method Dingtalk.GetAuthUsers should have comment or be unexported (golint)
    • excel2config/internal/di/app.go
    • Line 15: warning: comment on exported type App should be of the form "App ..." (with optional leading article) (golint)
    • Line 23: warning: exported function NewApp 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.


misspell94%

Misspell Finds commonly misspelled English words

    • excel2config/internal/dao/mongo.go
    • Line 569: warning: "Contributers" is a misspelling of "Contributors" (misspell)
    • Line 603: warning: "contributers" is a misspelling of "contributors" (misspell)
    • Line 610: warning: "contributers" is a misspelling of "contributors" (misspell)
    • Line 611: warning: "contributers" is a misspelling of "contributors" (misspell)
    • Line 613: warning: "contributers" is a misspelling of "contributors" (misspell)