dashpresshq/dashpress

View on GitHub

Showing 459 of 459 total issues

Avoid too many return statements within this function.
Open

        return operatorConfig[QueryOperators.BETWEEN](
          query,
          column,
          timeBetween
        );
Severity: Major
Found in src/backend/data/data-access/_Base.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return i18n._(availableOption.label);
    Severity: Major
    Found in src/frontend/views/data/viewSpecialDataTypes.tsx - About 30 mins to fix

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <SectionBox {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/section-box/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

      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

        selection: {
          onChange: action("on change"),
          options: [
            {
              label: "Foo",
      Severity: Minor
      Found in src/frontend/components/app/section-box/Stories.tsx and 1 other location - About 30 mins to fix
      src/frontend/components/app/section-box/Stories.tsx on lines 56..68

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

      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

        selection: {
          onChange: action("on change"),
          options: [
            {
              label: "Foo",
      Severity: Minor
      Found in src/frontend/components/app/section-box/Stories.tsx and 1 other location - About 30 mins to fix
      src/frontend/components/app/section-box/Stories.tsx on lines 138..150

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

      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

                  <EntityTableTabForm
                    initialValues={tableViews.data}
                    onSubmit={upsertTableViewsMutation.mutateAsync}
                    tableColumns={tableColumns.data || []}
                  />
      Severity: Minor
      Found in src/frontend/views/entity/Views/index.tsx and 1 other location - About 30 mins to fix
      src/frontend/views/entity/PersistentQuery/index.tsx 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 45.

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <Breadcrumbs {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/breadcrumbs/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

      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

          return Object.fromEntries(
            items.map(({ value, key }) => [key, JSON.parse(value)])
          );
      src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts on lines 93..95

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <Presentation {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/design-system/components/Form/File/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <ListSkeleton {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/skeleton/list/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

      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

                      <ViewStateMachine
                        error={error}
                        loading={isLoading}
                        loader={<FormSkeleton schema={[FormSkeletonSchema.Input]} />}
                      >
      Severity: Minor
      Found in src/frontend/views/entity/Relations/index.tsx and 1 other location - About 30 mins to fix
      src/frontend/views/entity/Form/ScriptForm.tsx on lines 42..80

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

      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

                <EntityPersistentQueryForm
                  initialValues={peristentQuery.data}
                  onSubmit={upsertPeristentQueryMutation.mutateAsync}
                  tableColumns={tableColumns.data || []}
                />
      Severity: Minor
      Found in src/frontend/views/entity/PersistentQuery/index.tsx and 1 other location - About 30 mins to fix
      src/frontend/views/entity/Views/index.tsx on lines 66..70

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <Alert {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/alert/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <FormSkeleton {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/skeleton/form/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

      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

            UPDATE: (submitting: boolean) =>
              submitting ? msg`Updating ${singular}` : msg`Update ${singular}`,
      Severity: Minor
      Found in src/frontend/lib/crud-config/index.ts and 2 other locations - About 30 mins to fix
      src/frontend/lib/crud-config/index.ts on lines 41..42
      src/frontend/lib/crud-config/index.ts on lines 43..44

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

      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

        {
          GET: async (getValidatedRequest) => {
            const validatedRequest = await getValidatedRequest(["entity"]);
      
            return await entitiesApiController.listAllEntityRelations(
      Severity: Minor
      Found in src/pages/api/entities/[entity]/relation-list.ts and 1 other location - About 30 mins to fix
      src/pages/api/entities/[entity]/fields.ts on lines 4..10

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <TableSkeleton {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/skeleton/table/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

      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

            CREATE: (submitting: boolean) =>
              submitting ? msg`Creating ${singular}` : msg`Create ${singular}`,
      Severity: Minor
      Found in src/frontend/lib/crud-config/index.ts and 2 other locations - About 30 mins to fix
      src/frontend/lib/crud-config/index.ts on lines 41..42
      src/frontend/lib/crud-config/index.ts on lines 45..46

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

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

      const Template: Story<IEmptyWrapperProps> = (args) => (
        <TestProviders>
          <EmptyWrapper {...args} />
        </TestProviders>
      );
      Severity: Major
      Found in src/frontend/components/app/empty-wrapper/Stories.tsx and 8 other locations - About 30 mins to fix
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26
      src/frontend/views/Dashboard/Widget/_render/Summary/Stories.tsx on lines 31..35

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

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

      const Template: Story<IProps> = (args) => (
        <TestProviders>
          <SummaryWidgetPresentation {...args} />
        </TestProviders>
      );
      src/frontend/components/app/alert/Stories.tsx on lines 20..24
      src/frontend/components/app/breadcrumbs/Stories.tsx on lines 33..37
      src/frontend/components/app/empty-wrapper/Stories.tsx on lines 19..23
      src/frontend/components/app/section-box/Stories.tsx on lines 20..24
      src/frontend/components/app/skeleton/form/Stories.tsx on lines 23..27
      src/frontend/components/app/skeleton/list/Stories.tsx on lines 18..22
      src/frontend/components/app/skeleton/table/Stories.tsx on lines 16..20
      src/frontend/design-system/components/Form/File/Stories.tsx on lines 22..26

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

      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