Preparing report...

Report for github.com/landers1037/dirichlet

(v0.0.0-20220218130131-a68483b7dab5)

A+    Excellent!    Found 62 issues across 82 files

Tweet

gofmt98%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint26%

Golint is a linter for Go source code.

    • app/task_manager/errors.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported const ErrTaskStart should have comment (or a comment on this block) or be unexported (golint)
    • engine/signals.go
    • Line 18: warning: exported const Stop should have comment (or a comment on this block) or be unexported (golint)
    • utils/back_up.go
    • Line 23: warning: exported const BackDir should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported function Backup should be of the form "Backup ..." (golint)
    • logger/logger.go
    • Line 15: warning: exported var Logger should have comment or be unexported (golint)
    • Line 17: warning: exported function InitLogger should have comment or be unexported (golint)
    • cron/ticker.go
    • Line 22: warning: exported type OneTicker should have comment or be unexported (golint)
    • Line 31: warning: exported method OneTicker.Start should have comment or be unexported (golint)
    • Line 36: warning: exported method OneTicker.Stop should have comment or be unexported (golint)
    • Line 42: warning: exported var TickerMap should have comment or be unexported (golint)
    • router/response.go
    • Line 16: warning: exported const OK should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function Response should have comment or be unexported (golint)
    • Line 38: warning: exported function Res4xx should have comment or be unexported (golint)
    • Line 48: warning: exported function Res5xx should have comment or be unexported (golint)
    • config/global_cf.go
    • Line 16: warning: exported var DirichletConf should have comment or be unexported (golint)
    • Line 19: warning: exported const GlobalConfigRoot should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: exported type Sqlite should have comment or be unexported (golint)
    • Line 70: warning: exported type Mongo should have comment or be unexported (golint)
    • Line 76: warning: exported type Redis should have comment or be unexported (golint)
    • Line 130: warning: exported method DConfig.ToJSON should have comment or be unexported (golint)
    • app/app_manager/consts.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 19: warning: exported var APPManager should have comment or be unexported (golint)
    • Line 25: warning: exported const APPConfigsRoot should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const APPStatusOK should have comment or be unexported (golint)
    • Line 39: warning: exported const APPStatusError should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const APPNotExist should have comment (or a comment on this block) or be unexported (golint)
    • engine/middleware.go
    • Line 20: warning: exported const MiddleWare should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var PreInjectMiddle should have comment or be unexported (golint)
    • Line 24: warning: exported var DefaultMiddleWare should have comment or be unexported (golint)
    • Line 46: warning: exported var MiddleWareMap should have comment or be unexported (golint)
    • app/task_manager/types.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 48: warning: exported const Created should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: comment on exported const Stopped should be of the form "Stopped ..." (golint)
    • Line 57: warning: exported const EmptyName should have comment or be unexported (golint)
    • Line 65: warning: exported function NewTask should have comment or be unexported (golint)
    • utils/random_ports.go
    • Line 15: warning: exported const MINPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function RandomPort should have comment or be unexported (golint)
    • app/app_manager/manager.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 26: warning: exported function GetApp should have comment or be unexported (golint)
    • Line 35: warning: exported function GetAllApp should have comment or be unexported (golint)
    • Line 44: warning: exported function Check should have comment or be unexported (golint)
    • Line 132: warning: exported function StatusAll should have comment or be unexported (golint)
    • utils/time_util.go
    • Line 15: warning: exported const TimeFormat should have comment (or a comment on this block) or be unexported (golint)
    • app/app_manager/app_model_func.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 135: warning: exported method App.Stop should have comment or be unexported (golint)
    • Line 154: warning: exported method App.ReStart should have comment or be unexported (golint)
    • app/task_manager/consts.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 13: warning: exported const TaskManagerPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported var TaskManager should have comment or be unexported (golint)
    • Line 17: warning: exported var TaskGroup should have comment or be unexported (golint)
    • Line 27: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • utils/bson_parser.go
    • Line 16: warning: exported function SaveBson should have comment or be unexported (golint)
    • Line 25: warning: exported function ParseBson should have comment or be unexported (golint)
    • router/router_web/init.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 17: warning: exported function Init should have comment or be unexported (golint)
    • uds/cmds.go
    • Line 31: warning: exported const SUCCESS should have comment (or a comment on this block) or be unexported (golint)
    • engine/middleware_cf.go
    • Line 21: warning: exported type MiddleWareConfig should have comment or be unexported (golint)
    • Line 29: warning: exported const GlobalMode should have comment (or a comment on this block) or be unexported (golint)
    • app/docker_manager/docker_client.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 18: warning: exported var DockerCli should have comment or be unexported (golint)
    • Line 21: warning: exported const DockerManager should have comment (or a comment on this block) or be unexported (golint)
    • engine/engine.go
    • Line 23: warning: exported const PLNACK_PROTO should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported type EngineConfig should have comment or be unexported (golint)
    • Line 45: warning: exported function NewEngine should have comment or be unexported (golint)
    • Line 87: warning: exported method Engine.Run should have comment or be unexported (golint)
    • Line 93: warning: exported method Engine.RunServer should have comment or be unexported (golint)
    • Line 110: warning: exported method Engine.RunServerTLS should have comment or be unexported (golint)
    • Line 138: warning: exported method Engine.GET should have comment or be unexported (golint)
    • Line 145: warning: exported method Engine.POST should have comment or be unexported (golint)
    • Line 152: warning: exported method Engine.DELETE should have comment or be unexported (golint)
    • Line 159: warning: exported method Engine.PUT should have comment or be unexported (golint)
    • cron/background_job.go
    • Line 18: warning: don't use underscores in Go names; const Duration_DBSaver should be DurationDBSaver (golint)
    • Line 19: warning: don't use underscores in Go names; const Duration_DBPersist should be DurationDBPersist (golint)
    • Line 20: warning: don't use underscores in Go names; const Duration_APPSync should be DurationAPPSync (golint)
    • Line 21: warning: don't use underscores in Go names; const Duration_APPSyncDB should be DurationAPPSyncDB (golint)
    • Line 22: warning: don't use underscores in Go names; const Duration_APPCheck should be DurationAPPCheck (golint)
    • Line 25: warning: exported function InitBackgroundJobs should have comment or be unexported (golint)
    • utils/cmd_runner.go
    • Line 44: warning: exported function CMDAsync should have comment or be unexported (golint)
    • Line 48: warning: exported function CMDRun should have comment or be unexported (golint)
    • Line 57: warning: exported function CMDRaw should have comment or be unexported (golint)
    • uds/errors.go
    • Line 9: warning: exported const ErrNoResponse should have comment (or a comment on this block) or be unexported (golint)
    • cron/cron.go
    • Line 13: warning: exported type Cron should have comment or be unexported (golint)
    • Line 26: warning: exported type CronManager should have comment or be unexported (golint)
    • dirichlet_init.go
    • Line 27: warning: exported const APPName should have comment (or a comment on this block) or be unexported (golint)
    • app/app_manager/dao.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 25: warning: exported method DaoAPP.CollectionName should have comment or be unexported (golint)
    • Line 122: warning: exported function SavePort should have comment or be unexported (golint)
    • Line 141: warning: exported function SaveRuntimeData should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words