vorteil/direktiv

View on GitHub

Showing 829 of 1,234 total issues

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

func (o *EventsAndState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-events-and.go and 10 other locations - About 55 mins to fix
pkg/model/state-action.go on lines 21..34
pkg/model/state-consume.go on lines 20..33
pkg/model/state-delay.go on lines 19..32
pkg/model/state-foreach.go on lines 23..36
pkg/model/state-generate-event.go on lines 44..57
pkg/model/state-getter.go on lines 50..63
pkg/model/state-noop.go on lines 17..30
pkg/model/state-parallel.go on lines 21..34
pkg/model/state-setter.go on lines 101..114
pkg/model/state-validate.go on lines 22..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 125.

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

  await expect
    .poll(
      async () =>
        await findConsumerWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/consumers/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/routes/details/index.spec.ts on lines 39..48
ui/e2e/gateway/routes/details/index.spec.ts on lines 135..144
ui/e2e/gateway/routes/list/index.spec.ts on lines 52..61
ui/e2e/gateway/routes/list/index.spec.ts on lines 132..141
ui/e2e/gateway/routes/list/index.spec.ts on lines 173..182

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

        {isAllowed ? (
          <>
            {noResults ? (
              <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                <TableCell colSpan={5}>
Severity: Major
Found in ui/src/pages/namespace/Gateway/Routes/Table/index.tsx and 7 other locations - About 55 mins to fix
ui/src/pages/namespace/Events/History/EventsList.tsx on lines 78..110
ui/src/pages/namespace/Events/Listeners/index.tsx on lines 32..59
ui/src/pages/namespace/Gateway/Consumers/Table/index.tsx on lines 50..72
ui/src/pages/namespace/Instances/List/index.tsx on lines 79..107
ui/src/pages/namespace/Permissions/Groups/index.tsx on lines 73..100
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97
ui/src/pages/namespace/Services/List/Table.tsx on lines 59..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

  await expect
    .poll(
      async () =>
        await findRouteWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/routes/list/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/consumers/index.spec.ts on lines 48..57
ui/e2e/gateway/routes/details/index.spec.ts on lines 39..48
ui/e2e/gateway/routes/details/index.spec.ts on lines 135..144
ui/e2e/gateway/routes/list/index.spec.ts on lines 52..61
ui/e2e/gateway/routes/list/index.spec.ts on lines 173..182

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

  await expect
    .poll(
      async () =>
        await findRouteWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/routes/list/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/consumers/index.spec.ts on lines 48..57
ui/e2e/gateway/routes/details/index.spec.ts on lines 39..48
ui/e2e/gateway/routes/details/index.spec.ts on lines 135..144
ui/e2e/gateway/routes/list/index.spec.ts on lines 52..61
ui/e2e/gateway/routes/list/index.spec.ts on lines 132..141

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

          <Fieldset
            label={t("pages.explorer.endpoint.editor.form.path")}
            htmlFor="path"
            className="grow"
          >
ui/src/pages/namespace/Explorer/Consumer/ConsumerEditor/Form/index.tsx on lines 55..61
ui/src/pages/namespace/Explorer/Service/ServiceEditor/Form/index.tsx on lines 76..82
ui/src/pages/namespace/Explorer/Service/ServiceEditor/Form/index.tsx on lines 160..166

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

        {isAllowed ? (
          <>
            {noResults ? (
              <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                <TableCell colSpan={5}>
Severity: Major
Found in ui/src/pages/namespace/Gateway/Consumers/Table/index.tsx and 7 other locations - About 55 mins to fix
ui/src/pages/namespace/Events/History/EventsList.tsx on lines 78..110
ui/src/pages/namespace/Events/Listeners/index.tsx on lines 32..59
ui/src/pages/namespace/Gateway/Routes/Table/index.tsx on lines 61..87
ui/src/pages/namespace/Instances/List/index.tsx on lines 79..107
ui/src/pages/namespace/Permissions/Groups/index.tsx on lines 73..100
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97
ui/src/pages/namespace/Services/List/Table.tsx on lines 59..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 8 locations. Consider refactoring.
Open

                  {isAllowed ? (
                    <>
                      {noResults ? (
                        <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                          <TableCell colSpan={6}>
Severity: Major
Found in ui/src/pages/namespace/Events/History/EventsList.tsx and 7 other locations - About 55 mins to fix
ui/src/pages/namespace/Events/Listeners/index.tsx on lines 32..59
ui/src/pages/namespace/Gateway/Consumers/Table/index.tsx on lines 50..72
ui/src/pages/namespace/Gateway/Routes/Table/index.tsx on lines 61..87
ui/src/pages/namespace/Instances/List/index.tsx on lines 79..107
ui/src/pages/namespace/Permissions/Groups/index.tsx on lines 73..100
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97
ui/src/pages/namespace/Services/List/Table.tsx on lines 59..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

  await expect
    .poll(
      async () =>
        await findRouteWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/routes/list/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/consumers/index.spec.ts on lines 48..57
ui/e2e/gateway/routes/details/index.spec.ts on lines 39..48
ui/e2e/gateway/routes/details/index.spec.ts on lines 135..144
ui/e2e/gateway/routes/list/index.spec.ts on lines 132..141
ui/e2e/gateway/routes/list/index.spec.ts on lines 173..182

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

  await expect
    .poll(
      async () =>
        await findRouteWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/routes/details/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/consumers/index.spec.ts on lines 48..57
ui/e2e/gateway/routes/details/index.spec.ts on lines 39..48
ui/e2e/gateway/routes/list/index.spec.ts on lines 52..61
ui/e2e/gateway/routes/list/index.spec.ts on lines 132..141
ui/e2e/gateway/routes/list/index.spec.ts on lines 173..182

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

    const instancesList = await getInstances({
      urlParams: {
        baseUrl: process.env.PLAYWRIGHT_UI_BASE_URL,
        namespace,
        limit: 10,
Severity: Minor
Found in ui/e2e/instances/list/index.spec.ts and 1 other location - About 55 mins to fix
ui/e2e/instances/list/index.spec.ts on lines 349..357

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

        {({
          currentItems,
          goToFirstPage,
          goToPage,
          goToNextPage,
Severity: Minor
Found in ui/src/components/PaginationProvider/index.stories.tsx and 1 other location - About 55 mins to fix
ui/src/components/PaginationProvider/__tests__/index.test.tsx on lines 29..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 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 2 locations. Consider refactoring.
Open

      queryClient.invalidateQueries({
        queryKey: fileKeys.file(namespace, {
          apiKey: apiKey ?? undefined,
          path: forceLeadingSlash(data.data.path),
        }),
Severity: Minor
Found in ui/src/api/files/mutate/updateFile.ts and 1 other location - About 55 mins to fix
ui/src/api/files/mutate/renameFile.ts on lines 45..50

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

          <Fieldset
            label={t("pages.explorer.consumer.editor.form.username")}
            htmlFor="username"
            className="grow"
          >
ui/src/pages/namespace/Explorer/Endpoint/EndpointEditor/Form/index.tsx on lines 53..59
ui/src/pages/namespace/Explorer/Service/ServiceEditor/Form/index.tsx on lines 76..82
ui/src/pages/namespace/Explorer/Service/ServiceEditor/Form/index.tsx on lines 160..166

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

            {isAllowed ? (
              <>
                {noResults ? (
                  <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                    <TableCell colSpan={3}>
Severity: Major
Found in ui/src/pages/namespace/Permissions/Groups/index.tsx and 7 other locations - About 55 mins to fix
ui/src/pages/namespace/Events/History/EventsList.tsx on lines 78..110
ui/src/pages/namespace/Events/Listeners/index.tsx on lines 32..59
ui/src/pages/namespace/Gateway/Consumers/Table/index.tsx on lines 50..72
ui/src/pages/namespace/Gateway/Routes/Table/index.tsx on lines 61..87
ui/src/pages/namespace/Instances/List/index.tsx on lines 79..107
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97
ui/src/pages/namespace/Services/List/Table.tsx on lines 59..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 8 locations. Consider refactoring.
Open

            {isAllowed ? (
              <>
                {noResults ? (
                  <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                    <TableCell colSpan={6}>
Severity: Major
Found in ui/src/pages/namespace/Instances/List/index.tsx and 7 other locations - About 55 mins to fix
ui/src/pages/namespace/Events/History/EventsList.tsx on lines 78..110
ui/src/pages/namespace/Events/Listeners/index.tsx on lines 32..59
ui/src/pages/namespace/Gateway/Consumers/Table/index.tsx on lines 50..72
ui/src/pages/namespace/Gateway/Routes/Table/index.tsx on lines 61..87
ui/src/pages/namespace/Permissions/Groups/index.tsx on lines 73..100
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97
ui/src/pages/namespace/Services/List/Table.tsx on lines 59..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 2 locations. Consider refactoring.
Open

  const instancesList = await getInstances({
    urlParams: {
      baseUrl: process.env.PLAYWRIGHT_UI_BASE_URL,
      namespace,
      limit: 15,
Severity: Minor
Found in ui/e2e/instances/list/index.spec.ts and 1 other location - About 55 mins to fix
ui/e2e/instances/list/index.spec.ts on lines 77..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

  await expect
    .poll(
      async () =>
        await findRouteWithApiRequest({
          namespace,
Severity: Major
Found in ui/e2e/gateway/routes/details/index.spec.ts and 5 other locations - About 55 mins to fix
ui/e2e/gateway/consumers/index.spec.ts on lines 48..57
ui/e2e/gateway/routes/details/index.spec.ts on lines 135..144
ui/e2e/gateway/routes/list/index.spec.ts on lines 52..61
ui/e2e/gateway/routes/list/index.spec.ts on lines 132..141
ui/e2e/gateway/routes/list/index.spec.ts on lines 173..182

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

        <Fieldset
          label={t("pages.explorer.service.editor.form.image")}
          htmlFor="image"
          className="grow"
        >
ui/src/pages/namespace/Explorer/Consumer/ConsumerEditor/Form/index.tsx on lines 55..61
ui/src/pages/namespace/Explorer/Endpoint/EndpointEditor/Form/index.tsx on lines 53..59
ui/src/pages/namespace/Explorer/Service/ServiceEditor/Form/index.tsx on lines 160..166

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

const EditGroup = ({
  group,
  close,
  unallowedNames,
}: {
Severity: Minor
Found in ui/src/pages/namespace/Permissions/Groups/Edit.tsx and 1 other location - About 55 mins to fix
ui/src/pages/namespace/Explorer/Tree/components/modals/Rename.tsx on lines 25..117

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

Severity
Category
Status
Source
Language