Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Function buildTitle has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private buildTitle (scope: VideoFilterScope = this.defaultScope, sort: VideoSortField = this.defaultSort) {
    const sanitizedSort = this.getSanitizedSort(sort)

    if (scope === 'local') {
      this.title = $localize`Local videos`

    Function getCoreProviders has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function getCoreProviders () {
      return [
        AuthService,
        ScopedTokensService,
        ConfirmService,
    Severity: Minor
    Found in client/src/app/core/core-providers.ts - About 1 hr to fix

      Function checkEndMessage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function checkEndMessage (options: {
        message: string
        requiresEmailVerification: boolean
        requiresApproval: boolean
        afterEmailVerification: boolean
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts - About 1 hr to fix

        Function buildPeerTubeHelpers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private buildPeerTubeHelpers (options: {
            pluginInfo: PluginInfo
            translations?: Translations
          }): RegisterClientHelpers {
            const { pluginInfo, translations } = options
        Severity: Minor
        Found in client/src/standalone/videos/shared/peertube-plugin.ts - About 1 hr to fix

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

            constructor (
              private pluginService: PluginService,
              private pluginApiService: PluginApiService,
              private notifier: Notifier,
              private confirmService: ConfirmService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private server: ServerService,
              private route: ActivatedRoute,
              private videoService: VideoService,
              private hooks: HooksService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private auth: AuthService,
              private userService: UserService,
              private hooks: HooksService,
              private serverService: ServerService,
          Severity: Major
          Found in client/src/app/+videos/+video-edit/video-add.component.ts and 9 other locations - About 1 hr to fix
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private videoService: VideoService,
              private liveVideoService: LiveVideoService,
              private authService: AuthService,
              private videoCaptionService: VideoCaptionService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private authService: AuthService,
              private notifier: Notifier,
              private confirmService: ConfirmService,
              private videoCommentService: VideoCommentService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private modalService: NgbModal,
              private userService: UserService,
              private authService: AuthService,
              private localStorageService: LocalStorageService,
          Severity: Major
          Found in client/src/app/menu/quick-settings-modal.component.ts and 9 other locations - About 1 hr to fix
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private markdown: MarkdownService,
              private findInBulk: FindInBulkService,
              private videoService: VideoService,
              private userService: UserService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private pluginService: PluginService,
              private pluginApiService: PluginApiService,
              private notifier: Notifier,
              private confirmService: ConfirmService,
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private authService: AuthService,
              private serverService: ServerService,
              private notifier: Notifier,
              private videoPlaylistService: VideoPlaylistService,
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-main/video/video.service.ts on lines 64..71

          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 62.

          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 10 locations. Consider refactoring.
          Open

            constructor (
              private auth: AuthService,
              private authHttp: HttpClient,
              private restExtractor: RestExtractor,
              private restService: RestService,
          Severity: Major
          Found in client/src/app/shared/shared-main/video/video.service.ts and 9 other locations - About 1 hr to fix
          client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts on lines 49..57
          client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts on lines 58..66
          client/src/app/+videos/+video-edit/video-add.component.ts on lines 73..80
          client/src/app/+videos/+video-edit/video-update.resolver.ts on lines 17..25
          client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts on lines 75..82
          client/src/app/+videos/video-list/videos-list-common-page.component.ts on lines 49..57
          client/src/app/menu/quick-settings-modal.component.ts on lines 34..42
          client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts on lines 40..47
          client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts on lines 72..79

          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 62.

          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

            MESSAGES: {
              required: $localize`Name is required.`,
              minlength: $localize`Name must be at least 1 character long.`,
              maxlength: $localize`Name cannot be more than 50 characters long.`,
              pattern: $localize`Name should be lowercase alphanumeric; dots and underscores are allowed.`
          client/src/app/shared/form-validators/user-validators.ts on lines 13..18
          client/src/app/shared/form-validators/user-validators.ts on lines 28..33
          client/src/app/shared/form-validators/video-validators.ts on lines 14..19

          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 62.

          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

            MESSAGES: {
              required: $localize`Username is required.`,
              minlength: $localize`Username must be at least 1 character long.`,
              maxlength: $localize`Username cannot be more than 50 characters long.`,
              pattern: $localize`Username should be lowercase alphanumeric; dots and underscores are allowed.`
          Severity: Major
          Found in client/src/app/shared/form-validators/user-validators.ts and 3 other locations - About 1 hr to fix
          client/src/app/shared/form-validators/user-validators.ts on lines 28..33
          client/src/app/shared/form-validators/video-channel-validators.ts on lines 9..14
          client/src/app/shared/form-validators/video-validators.ts on lines 14..19

          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 62.

          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

            MESSAGES: {
              required: $localize`Channel name is required.`,
              minlength: $localize`Channel name must be at least 1 character long.`,
              maxlength: $localize`Channel name cannot be more than 50 characters long.`,
              pattern: $localize`Channel name should be lowercase, and can contain only alphanumeric characters, dots and underscores.`
          Severity: Major
          Found in client/src/app/shared/form-validators/user-validators.ts and 3 other locations - About 1 hr to fix
          client/src/app/shared/form-validators/user-validators.ts on lines 13..18
          client/src/app/shared/form-validators/video-channel-validators.ts on lines 9..14
          client/src/app/shared/form-validators/video-validators.ts on lines 14..19

          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 62.

          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

                {
                  label: $localize`Delete`,
                  handler: follows => this.deleteFollowers(follows),
                  isDisplayed: follows => follows.every(f => f.state === 'rejected')
                }
          client/src/app/+admin/follows/followers-list/followers-list.component.ts on lines 60..64
          client/src/app/+admin/follows/followers-list/followers-list.component.ts on lines 65..69

          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 62.

          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

            MESSAGES: {
              required: $localize`Video name is required.`,
              minlength: $localize`Video name must be at least 3 characters long.`,
              maxlength: $localize`Video name cannot be more than 120 characters long.`,
              spaces: $localize`Video name has leading or trailing whitespace.`
          Severity: Major
          Found in client/src/app/shared/form-validators/video-validators.ts and 3 other locations - About 1 hr to fix
          client/src/app/shared/form-validators/user-validators.ts on lines 13..18
          client/src/app/shared/form-validators/user-validators.ts on lines 28..33
          client/src/app/shared/form-validators/video-channel-validators.ts on lines 9..14

          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 62.

          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

                {
                  label: $localize`Reject`,
                  handler: follows => this.rejectFollower(follows),
                  isDisplayed: follows => follows.every(f => f.state !== 'rejected')
                },
          client/src/app/+admin/follows/followers-list/followers-list.component.ts on lines 65..69
          client/src/app/+admin/follows/followers-list/followers-list.component.ts on lines 70..74

          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 62.

          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

          Severity
          Category
          Status
          Source
          Language