Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

    if (!checkVideoFileCanBeEdited(video, res)) return cleanUpReqFiles(req)
Severity: Major
Found in server/core/middlewares/validators/videos/video-studio.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return res.fail({
            status: HttpStatusCode.CONFLICT_409,
            type: ServerErrorCode.VIDEO_ALREADY_BEING_TRANSCODED,
            message: 'This video is already being transcoded'
          })
    Severity: Major
    Found in server/core/middlewares/validators/videos/video-transcoding.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return on404OrTombstone()
      Severity: Major
      Found in server/core/lib/job-queue/handlers/activitypub-cleaner.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return false
        Severity: Major
        Found in server/core/lib/auth/external-auth.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return next()
          Severity: Major
          Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return next()
            Severity: Major
            Found in server/core/middlewares/validators/videos/video-ownership-changes.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (!await isVideoCommentAccepted(req, res, res.locals.videoAll, false)) return
              Severity: Major
              Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    if (!await doesVideoCommentExist(req.params.commentId, res.locals.videoAll, res)) return
                Severity: Major
                Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return next()
                  Severity: Major
                  Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      if (result.videoQuotaDaily && !isUserVideoQuotaDailyValid(result.videoQuotaDaily + '')) return returnError('videoQuotaDaily')
                    Severity: Major
                    Found in server/core/lib/auth/external-auth.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        return true
                      Severity: Major
                      Found in server/core/lib/auth/external-auth.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                          return { input: stream, isTmpDestination: false }
                        Severity: Major
                        Found in server/core/lib/video-file.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return retryTransactionWrapper(processUndoAnnounce, byActor, activityToUndo)
                          Severity: Major
                          Found in server/core/lib/activitypub/process/process-undo.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return retryTransactionWrapper(processCreatePlaylist, activity, activityObject, byActor)
                            Severity: Major
                            Found in server/core/lib/activitypub/process/process-create.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    if (!o.live) return undefined
                              Severity: Major
                              Found in server/core/lib/user-import-export/importers/videos-importer.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return pick(o, [
                                      'name',
                                      'duration',
                                      'channel',
                                      'privacy',
                                Severity: Major
                                Found in server/core/lib/user-import-export/importers/videos-importer.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return null
                                  Severity: Major
                                  Found in server/core/lib/job-queue/handlers/activitypub-cleaner.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                      return Promise.resolve(undefined)
                                    Severity: Major
                                    Found in server/core/lib/activitypub/process/process-create.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                        if (diffSeconds >= 15 * aDay) return '1 day'
                                      Severity: Major
                                      Found in server/core/lib/timeserie.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                          return '1 minute'
                                        Severity: Major
                                        Found in server/core/lib/timeserie.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language