kitabisa/buroq

View on GitHub

Showing 5 of 9 total issues

Function start has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func start() {
    cfg := config.Config()
    logger := log.NewLogger("buroq")

    app := appcontext.NewAppContext(cfg)
Severity: Minor
Found in cmd/root.go - About 1 hr to fix

    Function NewCache has 8 return statements (exceeds 4 allowed).
    Open

    func NewCache(option CacheOption) *redis.Pool {
        dialConnectTimeoutOption := redis.DialConnectTimeout(option.DialConnectTimeout)
        readTimeoutOption := redis.DialReadTimeout(option.ReadTimeout)
        writeTimeoutOption := redis.DialWriteTimeout(option.WriteTimeout)
    
    
    Severity: Major
    Found in internal/app/driver/redis.go - About 50 mins to fix

      Function doMigrate has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func doMigrate(appCtx *appcontext.AppContext, logger *log.Logger, mSource migrate.FileMigrationSource, dbDialect string, direction migrate.MigrationDirection) error {
      Severity: Minor
      Found in cmd/migration.go - About 35 mins to fix

        Function start has 5 return statements (exceeds 4 allowed).
        Open

        func start() {
            cfg := config.Config()
            logger := log.NewLogger("buroq")
        
            app := appcontext.NewAppContext(cfg)
        Severity: Major
        Found in cmd/root.go - About 35 mins to fix

          Method HealthCheckHandler.HealthCheck has 5 return statements (exceeds 4 allowed).
          Open

          func (h HealthCheckHandler) HealthCheck(w http.ResponseWriter, r *http.Request) (data interface{}, pageToken *string, err error) {
              if h.HandlerOption.Config.GetBool("mysql.is_enabled") {
                  err = h.Services.HealthCheck.HealthCheckDbMysql()
                  if err != nil {
                      return
          Severity: Major
          Found in internal/app/handler/health_check.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language