vorteil/direktiv

View on GitHub

Showing 1,322 of 1,322 total issues

Avoid too many return statements within this function.
Open

  return [...startSegment, ...activeSegment, ...endSegment];
Severity: Major
Found in ui/src/components/Pagination/describePagination.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      if (!servicesList) return null;
    Severity: Major
    Found in ui/src/pages/namespace/Explorer/Service/index.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return new editorWorker();
      Severity: Major
      Found in ui/src/design/Editor/index.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return (
            <>
              <Header mirror={mirror} loading={!!pendingSyncs.length} />
              <PaginationProvider items={syncs} pageSize={pageSize}>
                {({
        Severity: Major
        Found in ui/src/pages/namespace/Mirror/Detail/index.tsx - About 30 mins to fix

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

          func (s *sqlEventTopicsStore) Delete(ctx context.Context, eventListenerID uuid.UUID) error {
              q := "DELETE FROM event_topics WHERE event_listener_id = $1;"
              tx := s.db.WithContext(ctx).Exec(q, eventListenerID)
              if tx.Error != nil {
                  return tx.Error
          Severity: Minor
          Found in pkg/refactor/datastore/datastoresql/eventstore_topic.go and 2 other locations - About 30 mins to fix
          pkg/refactor/datastore/datastoresql/eventstore_history.go on lines 58..66
          pkg/refactor/datastore/datastoresql/eventstore_listener.go on lines 98..106

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

          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(
              page
                .getByTestId("consumer-table")
                .getByRole("cell", { name: "userOld", exact: true }),
              "it shows the (old) username"
          Severity: Major
          Found in ui/e2e/gateway/consumers/index.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 166..171
          ui/e2e/services/list.spec.ts on lines 104..110
          ui/e2e/services/list.spec.ts on lines 112..117
          ui/e2e/services/list.spec.ts on lines 318..323
          ui/e2e/services/list.spec.ts on lines 351..356

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

          func (hs *sqlEventHistoryStore) DeleteOld(ctx context.Context, sinceWhen time.Time) error {
              q := "DELETE FROM events_history WHERE received_at < $1;"
              tx := hs.db.WithContext(ctx).Exec(q, sinceWhen)
              if tx.Error != nil {
                  return tx.Error
          Severity: Minor
          Found in pkg/refactor/datastore/datastoresql/eventstore_history.go and 2 other locations - About 30 mins to fix
          pkg/refactor/datastore/datastoresql/eventstore_listener.go on lines 98..106
          pkg/refactor/datastore/datastoresql/eventstore_topic.go on lines 52..60

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

          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(
              page
                .getByTestId("service-row")
                .getByRole("cell", { name: "1", exact: true }),
              "it renders the scale of the service"
          Severity: Major
          Found in ui/e2e/services/list.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 129..134
          ui/e2e/gateway/consumers/index.spec.ts on lines 166..171
          ui/e2e/services/list.spec.ts on lines 104..110
          ui/e2e/services/list.spec.ts on lines 318..323
          ui/e2e/services/list.spec.ts on lines 351..356

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

            await expect(
              page.getByTestId("service-row").getByRole("cell", {
                name: "gcr.io/direktiv/functions/http-request:1.0",
                exact: true,
              }),
          Severity: Major
          Found in ui/e2e/services/list.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 129..134
          ui/e2e/gateway/consumers/index.spec.ts on lines 166..171
          ui/e2e/services/list.spec.ts on lines 112..117
          ui/e2e/services/list.spec.ts on lines 318..323
          ui/e2e/services/list.spec.ts on lines 351..356

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

          func (s *sqlEventListenerStore) DeleteByID(ctx context.Context, id uuid.UUID) error {
              q := "DELETE FROM event_listeners WHERE id = $1;"
              tx := s.db.WithContext(ctx).Exec(q, id)
              if tx.Error != nil {
                  return tx.Error
          Severity: Minor
          Found in pkg/refactor/datastore/datastoresql/eventstore_listener.go and 2 other locations - About 30 mins to fix
          pkg/refactor/datastore/datastoresql/eventstore_history.go on lines 58..66
          pkg/refactor/datastore/datastoresql/eventstore_topic.go on lines 52..60

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

          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(
              page
                .getByTestId("consumer-table")
                .getByRole("cell", { name: "userNew", exact: true }),
              "it has updated the rendered username to the new value"
          Severity: Major
          Found in ui/e2e/gateway/consumers/index.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 129..134
          ui/e2e/services/list.spec.ts on lines 104..110
          ui/e2e/services/list.spec.ts on lines 112..117
          ui/e2e/services/list.spec.ts on lines 318..323
          ui/e2e/services/list.spec.ts on lines 351..356

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

            await expect(
              page
                .getByTestId("service-row")
                .getByRole("cell", { name: "1", exact: true }),
              "it shows the service's scale"
          Severity: Major
          Found in ui/e2e/services/list.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 129..134
          ui/e2e/gateway/consumers/index.spec.ts on lines 166..171
          ui/e2e/services/list.spec.ts on lines 104..110
          ui/e2e/services/list.spec.ts on lines 112..117
          ui/e2e/services/list.spec.ts on lines 351..356

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

            await expect(
              page
                .getByTestId("service-row")
                .getByRole("cell", { name: "2", exact: true }),
              "it has updated the rendered scale to the new value"
          Severity: Major
          Found in ui/e2e/services/list.spec.ts and 5 other locations - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 129..134
          ui/e2e/gateway/consumers/index.spec.ts on lines 166..171
          ui/e2e/services/list.spec.ts on lines 104..110
          ui/e2e/services/list.spec.ts on lines 112..117
          ui/e2e/services/list.spec.ts on lines 318..323

          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

            await createFile({
              name: "consumer.yaml",
              namespace,
              type: "consumer",
              yaml: createRedisConsumerFile({
          Severity: Minor
          Found in ui/e2e/gateway/consumers/index.spec.ts and 1 other location - About 30 mins to fix
          ui/e2e/gateway/consumers/index.spec.ts on lines 38..46

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

            {
              limit,
              offset,
              filters,
            }: {
          Severity: Minor
          Found in ui/src/api/events/query/get.ts and 1 other location - About 30 mins to fix
          ui/src/api/events/query/get.ts on lines 100..108

          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

            const mutationFn = (id: string) =>
              replayEvent({
                apiKey: apiKey ?? undefined,
                urlParams: {
                  id,
          Severity: Minor
          Found in ui/src/api/events/mutate/replayEvent.ts and 1 other location - About 30 mins to fix
          ui/src/api/variables/mutate/download.ts on lines 23..30

          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

          export const useEvents = ({
            limit,
            offset,
            filters,
          }: {
          Severity: Minor
          Found in ui/src/api/events/query/get.ts and 1 other location - About 30 mins to fix
          ui/src/api/events/query/get.ts on lines 129..137

          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

            const mutationFn = (id: string) =>
              getVariableDetails({
                apiKey: apiKey ?? undefined,
                urlParams: {
                  namespace,
          Severity: Minor
          Found in ui/src/api/variables/mutate/download.ts and 1 other location - About 30 mins to fix
          ui/src/api/events/mutate/replayEvent.ts on lines 39..46

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

            await expect(
              page.getByRole("cell", { name: `${patches.length} Patches` }),
              "It renders a table of patches, displaying the number of patches in the header"
            ).toBeVisible();
          Severity: Minor
          Found in ui/e2e/explorer/service/index.spec.ts and 1 other location - About 30 mins to fix
          ui/e2e/services/list.spec.ts on lines 201..206

          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

              mutationFn: (tokenFormProps: TokenFormSchemaType) =>
                createToken({
                  apiKey: apiKey ?? undefined,
                  urlParams: {
                    namespace,
          Severity: Minor
          Found in ui/src/api/enterprise/tokens/mutate/create.ts and 1 other location - About 30 mins to fix
          ui/src/api/enterprise/groups/mutation/create.ts on lines 35..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