hadmean/hadmean

View on GitHub

Showing 420 of 428 total issues

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

        fields={{
          password: {
            label: msg`Password`,
            type: "password",
            validations: [
Severity: Minor
Found in src/frontend/views/integrations/Password.tsx and 1 other location - About 35 mins to fix
src/frontend/views/settings/Data/index.tsx on lines 117..127

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

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

  entity_selections: {
    label: msg`Selections Settings`,
    requireEntity: true,
    defaultValue: {} as Record<string, IColorableSelection[]>,
  },
Severity: Minor
Found in src/shared/configurations/constants.ts and 1 other location - About 35 mins to fix
src/shared/configurations/constants.ts on lines 69..73

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

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

  const {
    input,
    selectData,
    meta,
    disabled,
Severity: Minor
Found in src/frontend/design-system/components/Form/Select/index.tsx and 1 other location - About 35 mins to fix
src/frontend/design-system/components/Form/Date/index.tsx on lines 53..63

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

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

export function TableViewComponent({ entity }: { entity: string }) {
  noop(entity);
  return <span />;
}
Severity: Minor
Found in src/frontend/views/data/Table/portal/main.tsx and 1 other location - About 35 mins to fix
src/frontend/views/data/Table/portal/main.tsx on lines 28..31

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

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

        {
          label: msg`Deactivate`,
          id: "deactivate",
          content: (
            <Deactivate
Severity: Minor
Found in src/frontend/views/integrations/actions/View/index.tsx and 1 other location - About 35 mins to fix
src/frontend/views/integrations/actions/View/index.tsx on lines 52..61

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

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

export function TableTopComponent({ entity }: { entity: string }) {
  noop(entity);
  return <span />;
}
Severity: Minor
Found in src/frontend/views/data/Table/portal/main.tsx and 1 other location - About 35 mins to fix
src/frontend/views/data/Table/portal/main.tsx on lines 23..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 46.

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

        {
          label: msg`Configure`,
          id: "configure",
          content: (
            <Configure
Severity: Minor
Found in src/frontend/views/integrations/actions/View/index.tsx and 1 other location - About 35 mins to fix
src/frontend/views/integrations/actions/View/index.tsx on lines 62..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 46.

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

Avoid too many return statements within this function.
Open

  return permissions.includes(requiredPermission);
Severity: Major
Found in src/shared/logic/permissions/index.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return await ApiRequest.GET(referenceUrl(input.value));
    Severity: Major
    Found in src/frontend/design-system/components/Form/Select/Async/index.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return input.value;
      Severity: Major
      Found in src/frontend/design-system/components/Form/Select/Async/index.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return new Date();
        Severity: Major
        Found in src/backend/data/data-access/time.constants.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return filterType;
          Severity: Major
          Found in src/frontend/views/data/Table/useTableColumns.tsx - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return (
                  <ReferenceComponent
                    entity={entityToOneReferenceFields?.[fieldName]}
                    id={value as string}
                    displayFrom={options.displayFrom}
            Severity: Major
            Found in src/frontend/views/data/viewSpecialDataTypes.tsx - 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

                Avoid too many return statements within this function.
                Open

                  return null;
                Severity: Major
                Found in src/frontend/views/data/viewSpecialDataTypes.tsx - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return (
                            <OptionTag
                              color={availableOption.color}
                              label={availableOption.label}
                              value={availableOption.value}
                  Severity: Major
                  Found in src/frontend/views/data/viewSpecialDataTypes.tsx - About 30 mins to fix

                    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

                      Similar blocks of code found in 15 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 14 other locations - About 30 mins to fix
                      src/frontend/design-system/components/Alert/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Breadcrumbs/Stories.tsx on lines 30..34
                      src/frontend/design-system/components/Button/Stories.tsx on lines 14..18
                      src/frontend/design-system/components/EmptyWrapper/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Form/Switch/Stories.tsx on lines 27..31
                      src/frontend/design-system/components/Section/MenuSection/Stories.tsx on lines 45..49
                      src/frontend/design-system/components/Section/SectionBox/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Skeleton/Base/Stories.tsx on lines 13..17
                      src/frontend/design-system/components/Skeleton/Form/Stories.tsx on lines 20..24
                      src/frontend/design-system/components/Skeleton/List/Stories.tsx on lines 15..19
                      src/frontend/design-system/components/Skeleton/Table/Stories.tsx on lines 13..17
                      src/frontend/design-system/components/Toasts/Stories.tsx on lines 28..32
                      src/frontend/design-system/components/Widgets/Summary/Stories.tsx on lines 28..32
                      src/frontend/design-system/components/Tabs/Stories.tsx on lines 38..42

                      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(({ key, value }) => [key, JSON.parse(value)])
                          );
                      src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts on lines 75..77

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

                      const Template: Story<IProps> = (args) => (
                        <TestProviders>
                          <ListSkeleton {...args} />
                        </TestProviders>
                      );
                      src/frontend/design-system/components/Alert/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Breadcrumbs/Stories.tsx on lines 30..34
                      src/frontend/design-system/components/Button/Stories.tsx on lines 14..18
                      src/frontend/design-system/components/EmptyWrapper/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Form/File/Stories.tsx on lines 19..23
                      src/frontend/design-system/components/Form/Switch/Stories.tsx on lines 27..31
                      src/frontend/design-system/components/Section/MenuSection/Stories.tsx on lines 45..49
                      src/frontend/design-system/components/Section/SectionBox/Stories.tsx on lines 17..21
                      src/frontend/design-system/components/Skeleton/Base/Stories.tsx on lines 13..17
                      src/frontend/design-system/components/Skeleton/Form/Stories.tsx on lines 20..24
                      src/frontend/design-system/components/Skeleton/Table/Stories.tsx on lines 13..17
                      src/frontend/design-system/components/Toasts/Stories.tsx on lines 28..32
                      src/frontend/design-system/components/Widgets/Summary/Stories.tsx on lines 28..32
                      src/frontend/design-system/components/Tabs/Stories.tsx on lines 38..42

                      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