Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Avoid too many return statements within this function.
Open

  if (!isVideoNameValid(video.name)) return fail('name')
Severity: Major
Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      if (exists(video.category) && !isRemoteNumberIdentifierValid(video.category)) return fail('category')
    Severity: Major
    Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        if (exists(video.content) && !isRemoteVideoContentValid(video.mediaType, video.content)) return fail('mediaType/content')
      Severity: Major
      Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return res.fail({
                status: HttpStatusCode.NOT_FOUND_404,
                message: 'Video redundancy not found.'
              })
        Severity: Major
        Found in server/core/middlewares/validators/redundancy.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return parseInt(match[1], 10) * 1024 * 1024 * 1024 * 1024
          Severity: Major
          Found in server/core/helpers/core-utils.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return undefined
            Severity: Major
            Found in server/core/helpers/youtube-dl/youtube-dl-info-builder.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return undefined
              Severity: Major
              Found in server/core/helpers/express-utils.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                  return true
                Severity: Major
                Found in server/core/helpers/custom-validators/activitypub/watch-action.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    if (mimeTypeRegex === null) return true
                  Severity: Major
                  Found in server/core/helpers/custom-validators/misc.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      if (!setValidRemoteIcon(video)) return fail('icons')
                    Severity: Major
                    Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        if (exists(video.originallyPublishedAt) && !isDateValid(video.originallyPublishedAt)) return fail('originallyPublishedAt')
                      Severity: Major
                      Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                          return forceNumber(start) < forceNumber(end)
                        Severity: Major
                        Found in server/core/helpers/custom-validators/video-studio.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return res.fail({
                                  status: HttpStatusCode.NOT_FOUND_404,
                                  message: 'Video redundancy not found.'
                                })
                          Severity: Major
                          Found in server/core/middlewares/validators/redundancy.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return parseInt(match[1], 10) * 1024
                            Severity: Major
                            Found in server/core/helpers/core-utils.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return fail('Video password should be a string.')
                              Severity: Major
                              Found in server/core/helpers/custom-validators/videos.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                  if (!isVideoViewsValid(video.views)) return fail('views')
                                Severity: Major
                                Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                    if (!isDateValid(video.updated)) return fail('updated')
                                  Severity: Major
                                  Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          if (playlistExists === true) return cb()
                                    Severity: Major
                                    Found in server/core/controllers/tracker.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                        if (CONFIG.INSTANCE.DEFAULT_NSFW_POLICY === 'do_not_list') return false
                                      Severity: Major
                                      Found in server/core/helpers/express-utils.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                              return fail('Invalid video password. Password length should be at least 2 characters and no more than 100 characters.')
                                        Severity: Major
                                        Found in server/core/helpers/custom-validators/videos.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language