Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

      return !!redundancy
Severity: Major
Found in server/scripts/prune-storage.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          if (!file) return false
    Severity: Major
    Found in server/scripts/prune-storage.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        if (audioCodecName === 'mp3') return 'mp4a.40.34'
      Severity: Major
      Found in server/core/helpers/ffmpeg/codecs.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return parseInt(match[1], 10) * 1024 * 1024 * 1024 * 1024 +
              parseInt(match[2], 10) * 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 VideoPlaylistElementType.REGULAR
          Severity: Major
          Found in server/core/models/video/video-playlist-element.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return modelName + 'Model'
            Severity: Major
            Found in server/core/models/shared/model-builder.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                return `${videoCodec}.${baseProfile}${level}`
              Severity: Major
              Found in server/core/helpers/ffmpeg/codecs.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return parseInt(match[1], 10) * 1024 * 1024 * 1024 +
                      parseInt(match[2], 10) * 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 imageBytes <= 15 * kB
                  Severity: Major
                  Found in server/core/helpers/image-utils.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      return checkMimetypeRegex(file.mimetype, mimeTypeRegex)
                    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 (!setValidStoryboard(video)) return fail('preview (storyboard)')
                      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 (!isActivityPubVideoDurationValid(video.duration)) return fail('duration format')
                        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 (!isUUIDValid(video.uuid)) return fail('uuid')
                          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 next()
                            Severity: Major
                            Found in server/core/middlewares/validators/redundancy.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  if (newSize.height >= 500) return imageBytes <= 100 * kB
                              Severity: Major
                              Found in server/core/helpers/image-utils.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

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

                                  Avoid too many return statements within this function.
                                  Open

                                    if (!start || !end) return true
                                  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

                                      if (video.attributedTo.length === 0) return fail('attributedTo')
                                    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 (!isActivityPubUrlValid(video.id)) return fail('id')
                                      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 cb(err)
                                        Severity: Major
                                        Found in server/core/controllers/tracker.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language