vorteil/direktiv

View on GitHub

Showing 1,235 of 1,235 total issues

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

func (o *GetterState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-getter.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-events-and.go on lines 20..33
pkg/model/state-foreach.go on lines 23..36
pkg/model/state-generate-event.go on lines 44..57
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 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

Function InstancesListPage has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

const InstancesListPage = () => {
  const [offset, setOffset] = useState(0);
  const [filters, setFilters] = useState<FiltersObj>({});
  const { t } = useTranslation();
  const { data, isSuccess, isAllowed, noPermissionMessage } = useInstances({
Severity: Minor
Found in ui/src/pages/namespace/Instances/List/index.tsx - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function RoutesTable has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

const RoutesTable = ({
  search,
  filteredRoutes,
}: {
  search: string;
Severity: Minor
Found in ui/src/pages/namespace/Gateway/Routes/Table/index.tsx - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

func (o *NoopState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-noop.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-events-and.go on lines 20..33
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-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 11 locations. Consider refactoring.
Open

func (o *GenerateEventState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-generate-event.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-events-and.go on lines 20..33
pkg/model/state-foreach.go on lines 23..36
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 11 locations. Consider refactoring.
Open

func (o *ForEachState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-foreach.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-events-and.go on lines 20..33
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 11 locations. Consider refactoring.
Open

func (o *ConsumeEventState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-consume.go and 10 other locations - About 55 mins to fix
pkg/model/state-action.go on lines 21..34
pkg/model/state-delay.go on lines 19..32
pkg/model/state-events-and.go on lines 20..33
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 11 locations. Consider refactoring.
Open

func (o *ActionState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-action.go and 10 other locations - About 55 mins to fix
pkg/model/state-consume.go on lines 20..33
pkg/model/state-delay.go on lines 19..32
pkg/model/state-events-and.go on lines 20..33
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 11 locations. Consider refactoring.
Open

func (o *ParallelState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-parallel.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-events-and.go on lines 20..33
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-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 11 locations. Consider refactoring.
Open

func (o *ValidateState) getTransitions() map[string]string {
    transitions := make(map[string]string)
    if o.Transition != "" {
        transitions["transition"] = o.Transition
    }
Severity: Major
Found in pkg/model/state-validate.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-events-and.go on lines 20..33
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

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

            {isAllowed ? (
              <>
                {noResults ? (
                  <TableRow className="hover:bg-inherit dark:hover:bg-inherit">
                    <TableCell colSpan={4}>
Severity: Major
Found in ui/src/pages/namespace/Permissions/Tokens/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/Groups/index.tsx on lines 73..100
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 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 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 ? (
          <>
            {showTable &&
              services?.map((service) => (
                <Row
Severity: Major
Found in ui/src/pages/namespace/Services/List/Table.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/Groups/index.tsx on lines 73..100
ui/src/pages/namespace/Permissions/Tokens/index.tsx on lines 71..97

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 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/Listeners/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/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 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

Severity
Category
Status
Source
Language