Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

  return AccountAutomaticTagPolicyModel.hasPolicyOnTags({
    accountId: video.VideoChannel.accountId,
    policy: AutomaticTagPolicy.REVIEW_COMMENT,
    tags: ownerAccountTags,
    transaction
Severity: Major
Found in server/core/lib/video-comment.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        if (o.isLive !== true && !o.archiveFiles?.videoFile) 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

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

        Avoid too many return statements within this function.
        Open

              if (o.passwords.some(p => !isPasswordValid(p))) 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 undefined
          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 undefined
            Severity: Major
            Found in server/core/lib/activitypub/process/process-update.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    if (!isArray(o.passwords)) 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

                  if (diffSeconds >= 180 * aMinute) return '10 minutes'
                Severity: Major
                Found in server/core/lib/timeserie.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        if (o.live.saveReplay && !isVideoReplayPrivacyValid(o.live.replaySettings.privacy)) 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, [ 'type', 'displayName', 'privacy', 'elements', 'channel', 'description', 'archiveFiles' ])
                    Severity: Major
                    Found in server/core/lib/user-import-export/importers/video-playlists-importer.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            if (!isBooleanValid(o.live.permanentLive)) 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 { 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

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

                            Avoid too many return statements within this function.
                            Open

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

                              Avoid too many return statements within this function.
                              Open

                                  return retryTransactionWrapper(processCreateCacheFile, 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 (ownerAccountTags.length === 0) return false
                                Severity: Major
                                Found in server/core/lib/video-comment.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                        else if (!isUUIDValid(o.live.streamKey)) 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

                                              if (v === 'waiting-for-parent-job') return RunnerJobState.WAITING_FOR_PARENT_JOB
                                    Severity: Major
                                    Found in client/src/app/+admin/system/runners/runner.service.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return videoPlaylist
                                      Severity: Major
                                      Found in server/core/lib/activitypub/playlists/refresh.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                  return undefined
                                        Severity: Major
                                        Found in client/src/app/+admin/system/runners/runner.service.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language