Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Function processVideoTranscription has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export async function processVideoTranscription (options: ProcessOptions<RunnerJobTranscriptionPayload>) {
  const { server, job, runnerToken } = options

  const config = ConfigManager.Instance.getConfig().transcription

    Function processHLSTranscoding has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export async function processHLSTranscoding (options: ProcessOptions<RunnerJobVODHLSTranscodingPayload>) {
      const { server, job, runnerToken } = options
      const payload = job.payload
    
      let ffmpegProgress: number
    Severity: Major
    Found in apps/peertube-runner/src/server/process/shared/process-vod.ts - About 2 hrs to fix

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      const addAbuseMessageValidator = [
        body('message')
          .custom(isAbuseMessageValid),
      
        (req: express.Request, res: express.Response, next: express.NextFunction) => {
      Severity: Major
      Found in server/core/middlewares/validators/abuse.ts and 3 other locations - About 2 hrs to fix
      server/core/middlewares/validators/plugins.ts on lines 85..94
      server/core/middlewares/validators/plugins.ts on lines 139..148
      server/core/middlewares/validators/redundancy.ts on lines 130..139

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      const listVideoRedundanciesValidator = [
        query('target')
          .custom(isVideoRedundancyTarget),
      
        (req: express.Request, res: express.Response, next: express.NextFunction) => {
      Severity: Major
      Found in server/core/middlewares/validators/redundancy.ts and 3 other locations - About 2 hrs to fix
      server/core/middlewares/validators/abuse.ts on lines 198..207
      server/core/middlewares/validators/plugins.ts on lines 85..94
      server/core/middlewares/validators/plugins.ts on lines 139..148

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      const uninstallPluginValidator = [
        body('npmName')
          .custom(isNpmPluginNameValid),
      
        (req: express.Request, res: express.Response, next: express.NextFunction) => {
      Severity: Major
      Found in server/core/middlewares/validators/plugins.ts and 3 other locations - About 2 hrs to fix
      server/core/middlewares/validators/abuse.ts on lines 198..207
      server/core/middlewares/validators/plugins.ts on lines 85..94
      server/core/middlewares/validators/redundancy.ts on lines 130..139

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      const pluginStaticDirectoryValidator = [
        param('staticEndpoint')
          .custom(isSafePath),
      
        (req: express.Request, res: express.Response, next: express.NextFunction) => {
      Severity: Major
      Found in server/core/middlewares/validators/plugins.ts and 3 other locations - About 2 hrs to fix
      server/core/middlewares/validators/abuse.ts on lines 198..207
      server/core/middlewares/validators/plugins.ts on lines 139..148
      server/core/middlewares/validators/redundancy.ts on lines 130..139

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

            dayNames: [
              $localize`Sunday`,
              $localize`Monday`,
              $localize`Tuesday`,
              $localize`Wednesday`,
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 19..27
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 29..37

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        getRegisteredThemeByShortName (name: string) {
          const npmName = PluginModel.buildNpmName(name, PluginType.THEME)
          const registered = this.getRegisteredPluginOrTheme(npmName)
      
          if (!registered || registered.type !== PluginType.THEME) return undefined
      Severity: Major
      Found in server/core/lib/plugins/plugin-manager.ts and 1 other location - About 2 hrs to fix
      server/core/lib/plugins/plugin-manager.ts on lines 129..136

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

            try {
              importModel.state = UserImportState.ERRORED
              importModel.error = err.message
      
              await saveInTransactionWithRetries(importModel)
      Severity: Major
      Found in server/core/lib/user-import-export/user-importer.ts and 1 other location - About 2 hrs to fix
      server/core/lib/user-import-export/user-exporter.ts on lines 77..84

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        private async buildAbuseStats () {
          if (!CONFIG.STATS.ABUSES.ENABLED) {
            return {
              averageAbuseResponseTimeMs: null,
              totalAbuses: null,
      Severity: Major
      Found in server/core/lib/stat-manager.ts and 1 other location - About 2 hrs to fix
      server/core/lib/stat-manager.ts on lines 200..212

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        updateInstanceAvatar (formData: FormData) {
          const url = InstanceService.BASE_CONFIG_URL + '/instance-avatar/pick'
      
          return this.authHttp.post(url, formData)
            .pipe(catchError(err => this.restExtractor.handleError(err)))
      client/src/app/shared/shared-main/instance/instance.service.ts on lines 36..41

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        updateInstanceBanner (formData: FormData) {
          const url = InstanceService.BASE_CONFIG_URL + '/instance-banner/pick'
      
          return this.authHttp.post(url, formData)
            .pipe(catchError(err => this.restExtractor.handleError(err)))
      client/src/app/shared/shared-main/instance/instance.service.ts on lines 52..57

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        private async buildRegistrationRequestsStats () {
          if (!CONFIG.STATS.REGISTRATION_REQUESTS.ENABLED) {
            return {
              averageRegistrationRequestResponseTimeMs: null,
              totalRegistrationRequests: null,
      Severity: Major
      Found in server/core/lib/stat-manager.ts and 1 other location - About 2 hrs to fix
      server/core/lib/stat-manager.ts on lines 214..226

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

            try {
              exportModel.state = UserExportState.ERRORED
              exportModel.error = err.message
      
              await saveInTransactionWithRetries(exportModel)
      Severity: Major
      Found in server/core/lib/user-import-export/user-exporter.ts and 1 other location - About 2 hrs to fix
      server/core/lib/user-import-export/user-importer.ts on lines 78..85

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

            dayNamesShort: [
              $localize`:Sunday short name|Day name short:Sun`,
              $localize`:Monday short name|Day name short:Mon`,
              $localize`:Tuesday short name|Day name short:Tue`,
              $localize`:Wednesday short name|Day name short:Wed`,
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 9..17
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 29..37

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        getRegisteredPluginByShortName (name: string) {
          const npmName = PluginModel.buildNpmName(name, PluginType.PLUGIN)
          const registered = this.getRegisteredPluginOrTheme(npmName)
      
          if (!registered || registered.type !== PluginType.PLUGIN) return undefined
      Severity: Major
      Found in server/core/lib/plugins/plugin-manager.ts and 1 other location - About 2 hrs to fix
      server/core/lib/plugins/plugin-manager.ts on lines 138..145

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        remove (options: OverrideCommandOptions & {
          id: number
          videoId: number | string
        }) {
          const { id, videoId } = options
      packages/server-commands/src/videos/channels-command.ts on lines 147..162

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        deleteImage (options: OverrideCommandOptions & {
          channelName: string | number
          type: 'avatar' | 'banner'
        }) {
          const { channelName, type } = options
      Severity: Major
      Found in packages/server-commands/src/videos/channels-command.ts and 1 other location - About 2 hrs to fix
      packages/server-commands/src/videos/video-passwords-command.ts on lines 41..55

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

            dayNamesMin: [
              $localize`:Sunday min name|Day name min:Su`,
              $localize`:Monday min name|Day name min:Mo`,
              $localize`:Tuesday min name|Day name min:Tu`,
              $localize`:Wednesday min name|Day name min:We`,
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 9..17
      client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts on lines 19..27

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function getSitemapLocalVideoUrls has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      async function getSitemapLocalVideoUrls () {
        const serverActor = await getServerActor()
      
        let acc: { url: string, video: any[] }[] = []
      
      
      Severity: Major
      Found in server/core/controllers/sitemap.ts - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language