exercism/website

View on GitHub
app/javascript/packs/internal.tsx

Summary

Maintainability
F
1 wk
Test Coverage

File internal.tsx has 578 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable @typescript-eslint/no-explicit-any */
// Absolute, module imports
import React, { Suspense, lazy } from 'react'
import { camelizeKeys } from 'humps'
import currency from 'currency.js'
Severity: Major
Found in app/javascript/packs/internal.tsx - About 1 day to fix

    `` has 47 functions (exceeds 20 allowed). Consider refactoring.
    Open

    initReact({
      'common-markdown-editor': (data: any) => (
        <Suspense fallback={RenderLoader()}>
          <MarkdownEditor contextId={data.context_id} />
        </Suspense>
    Severity: Minor
    Found in app/javascript/packs/internal.tsx - About 6 hrs to fix

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

        'settings-theme-preference-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <ThemePreferenceForm
              defaultThemePreference={data.default_theme_preference}
              insidersStatus={data.insiders_status}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 2 hrs to fix
      app/javascript/packs/internal.tsx on lines 335..343

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

      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

        'mentoring-try-mentoring-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <TryMentoringButton
              text={data.text}
              size={data.size}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 2 hrs to fix
      app/javascript/packs/internal.tsx on lines 456..464

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

      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

        'settings-pronouns-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <PronounsForm
              handle={data.handle}
              defaultPronounParts={data.pronoun_parts}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 2 hrs to fix
      app/javascript/packs/internal.tsx on lines 397..405

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

      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

        'settings-profile-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <ProfileForm
              defaultUser={data.user}
              defaultProfile={data.profile}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 2 hrs to fix
      app/javascript/packs/internal.tsx on lines 419..427

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

      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

        'settings-photo-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <PhotoForm
              defaultUser={camelizeKeysAs<User>(data.user)}
              links={data.links}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 2 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 448..455
      app/javascript/packs/internal.tsx on lines 472..481

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

      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

        'settings-user-preferences-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <UserPreferencesForm
              defaultPreferences={camelizeKeysAs<UserPreferences>(data.preferences)}
              links={data.links}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 2 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 406..413
      app/javascript/packs/internal.tsx on lines 472..481

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

      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

        'settings-communication-preferences-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <CommunicationPreferencesForm
              defaultPreferences={camelizeKeysAs<CommunicationPreferences>(
                data.preferences
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 2 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 406..413
      app/javascript/packs/internal.tsx on lines 448..455

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

      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

        'student-publish-solution-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <PublishSolutionButton
              endpoint={data.endpoint}
              iterations={camelizeKeysAs<readonly Iteration[]>(data.iterations)}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 1 hr to fix
      app/javascript/packs/application.tsx on lines 494..501

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

      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

        'journey-journey-page': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <JourneyPage
              categories={camelizeKeysAs<readonly JourneyPageCategory[]>(
                data.categories
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 1 other location - About 1 hr to fix
      app/javascript/packs/application.tsx on lines 416..423

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

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

        'settings-email-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <EmailForm defaultEmail={data.email} links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 428..432
      app/javascript/packs/internal.tsx on lines 443..447
      app/javascript/packs/internal.tsx on lines 482..486
      app/javascript/packs/internal.tsx on lines 487..491
      app/javascript/packs/internal.tsx on lines 492..499

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

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

        'settings-handle-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <HandleForm defaultHandle={data.handle} links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 433..437
      app/javascript/packs/internal.tsx on lines 443..447
      app/javascript/packs/internal.tsx on lines 482..486
      app/javascript/packs/internal.tsx on lines 487..491
      app/javascript/packs/internal.tsx on lines 492..499

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

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

        'settings-reset-account-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <ResetAccountButton handle={data.handle} links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 428..432
      app/javascript/packs/internal.tsx on lines 433..437
      app/javascript/packs/internal.tsx on lines 443..447
      app/javascript/packs/internal.tsx on lines 482..486
      app/javascript/packs/internal.tsx on lines 492..499

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

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

        'settings-delete-account-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <DeleteAccountButton handle={data.handle} links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 428..432
      app/javascript/packs/internal.tsx on lines 433..437
      app/javascript/packs/internal.tsx on lines 443..447
      app/javascript/packs/internal.tsx on lines 487..491
      app/javascript/packs/internal.tsx on lines 492..499

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

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

        'settings-show-on-supporters-page-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <ShowOnSupportersPageButton
              defaultValue={data.value}
              links={data.links}
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 428..432
      app/javascript/packs/internal.tsx on lines 433..437
      app/javascript/packs/internal.tsx on lines 443..447
      app/javascript/packs/internal.tsx on lines 482..486
      app/javascript/packs/internal.tsx on lines 487..491

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

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

        'settings-token-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <TokenForm defaultToken={data.token} links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 428..432
      app/javascript/packs/internal.tsx on lines 433..437
      app/javascript/packs/internal.tsx on lines 482..486
      app/javascript/packs/internal.tsx on lines 487..491
      app/javascript/packs/internal.tsx on lines 492..499

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

      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

        'mentoring-representations-with-feedback': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <RepresentationsWithFeedback
              data={camelizeKeysAs<AutomationProps>(data)}
            />
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 3 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 323..327
      app/javascript/packs/internal.tsx on lines 328..334
      app/javascript/packs/internal.tsx on lines 355..359

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

      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

        'mentoring-representations-admin': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <RepresentationsAdmin data={camelizeKeysAs<AutomationProps>(data)} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 3 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 316..322
      app/javascript/packs/internal.tsx on lines 328..334
      app/javascript/packs/internal.tsx on lines 355..359

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

      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

        'mentoring-representations-without-feedback': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <RepresentationsWithoutFeedback
              data={camelizeKeysAs<AutomationProps>(data)}
            />
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 3 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 316..322
      app/javascript/packs/internal.tsx on lines 323..327
      app/javascript/packs/internal.tsx on lines 355..359

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

      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

        'mentoring-representation': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <Representation data={camelizeKeysAs<CompleteRepresentationData>(data)} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 3 other locations - About 1 hr to fix
      app/javascript/packs/internal.tsx on lines 316..322
      app/javascript/packs/internal.tsx on lines 323..327
      app/javascript/packs/internal.tsx on lines 328..334

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

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

        'student-change-published-iteration-modal-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <ChangePublishedIterationModalButton
              {...camelizeKeysAs<ChangePublishedIterationModalButtonProps>(data)}
            />
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 4 other locations - About 1 hr to fix
      app/javascript/packs/application.tsx on lines 441..445
      app/javascript/packs/application.tsx on lines 446..450
      app/javascript/packs/internal.tsx on lines 465..471
      app/javascript/packs/internal.tsx on lines 579..585

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

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

        'settings-comments-preference-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <CommentsPreferenceForm
              {...camelizeKeysAs<CommentsPreferenceFormProps>(data)}
            />
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 4 other locations - About 1 hr to fix
      app/javascript/packs/application.tsx on lines 441..445
      app/javascript/packs/application.tsx on lines 446..450
      app/javascript/packs/internal.tsx on lines 572..578
      app/javascript/packs/internal.tsx on lines 579..585

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

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

        'student-unpublish-solution-modal-button': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <UnpublishSolutionModalButton
              {...camelizeKeysAs<UnpublishSolutionModalButtonProps>(data)}
            />
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 4 other locations - About 1 hr to fix
      app/javascript/packs/application.tsx on lines 441..445
      app/javascript/packs/application.tsx on lines 446..450
      app/javascript/packs/internal.tsx on lines 465..471
      app/javascript/packs/internal.tsx on lines 572..578

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

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

        'settings-delete-profile-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <DeleteProfileForm links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 218..222
      app/javascript/packs/internal.tsx on lines 230..234
      app/javascript/packs/internal.tsx on lines 240..244
      app/javascript/packs/internal.tsx on lines 438..442
      app/javascript/packs/internal.tsx on lines 586..590

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

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

        'settings-password-form': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <PasswordForm links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 218..222
      app/javascript/packs/internal.tsx on lines 230..234
      app/javascript/packs/internal.tsx on lines 240..244
      app/javascript/packs/internal.tsx on lines 414..418
      app/javascript/packs/internal.tsx on lines 586..590

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

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

        'student-update-exercise-notice': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <UpdateExerciseNotice links={data.links} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 218..222
      app/javascript/packs/internal.tsx on lines 230..234
      app/javascript/packs/internal.tsx on lines 240..244
      app/javascript/packs/internal.tsx on lines 414..418
      app/javascript/packs/internal.tsx on lines 438..442

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

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

        'modals-welcome-to-insiders-modal': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <WelcomeToInsidersModal endpoint={data.endpoint} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 218..222
      app/javascript/packs/internal.tsx on lines 230..234
      app/javascript/packs/internal.tsx on lines 414..418
      app/javascript/packs/internal.tsx on lines 438..442
      app/javascript/packs/internal.tsx on lines 586..590

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

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

        'modals-welcome-modal': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <WelcomeModal endpoint={data.endpoint} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 218..222
      app/javascript/packs/internal.tsx on lines 240..244
      app/javascript/packs/internal.tsx on lines 414..418
      app/javascript/packs/internal.tsx on lines 438..442
      app/javascript/packs/internal.tsx on lines 586..590

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

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

        'common-markdown-editor': (data: any) => (
          <Suspense fallback={RenderLoader()}>
            <MarkdownEditor contextId={data.context_id} />
          </Suspense>
        ),
      Severity: Major
      Found in app/javascript/packs/internal.tsx and 5 other locations - About 55 mins to fix
      app/javascript/packs/internal.tsx on lines 230..234
      app/javascript/packs/internal.tsx on lines 240..244
      app/javascript/packs/internal.tsx on lines 414..418
      app/javascript/packs/internal.tsx on lines 438..442
      app/javascript/packs/internal.tsx on lines 586..590

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

      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

      There are no issues that match your filters.

      Category
      Status