BetterTyped/hyper-fetch

View on GitHub

Showing 248 of 345 total issues

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

  removeOnRequestInterceptors = (
    callbacks: RequestInterceptorType[],
  ): Client<GlobalErrorType, Adapter, EndpointMapper> => {
    this.__onRequestCallbacks = this.__onRequestCallbacks.filter((callback) => !callbacks.includes(callback));
    return this;
Severity: Major
Found in packages/core/src/client/client.ts and 1 other location - About 2 hrs to fix
packages/core/src/client/client.ts on lines 270..275

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

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 websocketAdapter has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

export const websocketAdapter: WebsocketAdapterType = (socket) => {
  const {
    open,
    listeners,
    connecting,
Severity: Minor
Found in packages/sockets/src/adapter/adapter.websocket.ts - About 2 hrs 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 handleSubmit has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleSubmit: RequestSendType<RequestType> = (submitOptions?: RequestSendOptionsType<RequestType>) => {
    const requestClone = request.clone(submitOptions as any) as RequestType;

    if (disabled) {
      logger.warning(`Cannot submit request`, { disabled, submitOptions });
Severity: Major
Found in packages/react/src/hooks/use-submit/use-submit.hooks.ts - About 2 hrs to fix

    Function adapter has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const adapter: FirebaseBrowserAdapterTypes<T> = async (request, requestId) => {
          const { fullUrl, onSuccess, onError, onResponseStart, onResponseEnd, onRequestStart, onRequestEnd } =
            await getAdapterBindings<RealtimeDbAdapterType | FirestoreAdapterType>(request, requestId, "error", {});
          return new Promise<ResponseReturnType<any, any, FirebaseBrowserAdapterTypes<T>>>((resolve) => {
            if (database instanceof Database) {
    Severity: Major
    Found in packages/adapter-firebase/src/adapter/adapter.ts - About 2 hrs to fix

      Function getFirestoreAdminMethods has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const getFirestoreAdminMethods = <R extends RequestInstance>(
        request: R,
        database: Firestore,
        url: string,
        onSuccess,
      Severity: Major
      Found in packages/adapter-firebase-admin/src/firestore/firestore.methods.ts - About 2 hrs to fix

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

          onResponse = <ErrorType = null>(
            callback: ResponseInterceptorType<any, ErrorType | GlobalErrorType, Adapter>,
          ): Client<GlobalErrorType, Adapter, EndpointMapper> => {
            this.__onResponseCallbacks.push(callback);
            return this;
        Severity: Major
        Found in packages/core/src/client/client.ts and 2 other locations - About 2 hrs to fix
        packages/core/src/client/client.ts on lines 280..285
        packages/core/src/client/client.ts on lines 300..305

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

        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 onClose = () => {
            logger.info("Connection closed");
            socket.__onCloseCallbacks.forEach((callback) => {
              callback(socket);
            });
        Severity: Major
        Found in packages/sockets/src/adapter/adapter.bindings.ts and 1 other location - About 2 hrs to fix
        packages/sockets/src/adapter/adapter.bindings.ts on lines 105..113

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

        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

          onSuccess = <ErrorType = null>(
            callback: ResponseInterceptorType<any, ErrorType | GlobalErrorType, Adapter>,
          ): Client<GlobalErrorType, Adapter, EndpointMapper> => {
            this.__onSuccessCallbacks.push(callback);
            return this;
        Severity: Major
        Found in packages/core/src/client/client.ts and 2 other locations - About 2 hrs to fix
        packages/core/src/client/client.ts on lines 280..285
        packages/core/src/client/client.ts on lines 338..343

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

        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 onOpen = () => {
            logger.info("Connection open");
            socket.__onOpenCallbacks.forEach((callback) => {
              callback(socket);
            });
        Severity: Major
        Found in packages/sockets/src/adapter/adapter.bindings.ts and 1 other location - About 2 hrs to fix
        packages/sockets/src/adapter/adapter.bindings.ts on lines 115..123

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

        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

          onError = <ErrorType = null>(
            callback: ResponseInterceptorType<any, ErrorType | GlobalErrorType, Adapter>,
          ): Client<GlobalErrorType, Adapter, EndpointMapper> => {
            this.__onErrorCallbacks.push(callback);
            return this;
        Severity: Major
        Found in packages/core/src/client/client.ts and 2 other locations - About 2 hrs to fix
        packages/core/src/client/client.ts on lines 300..305
        packages/core/src/client/client.ts on lines 338..343

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

        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 axiosAdapter has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const axiosAdapter = (): AxiosAdapterType => async (request, requestId) => {
          const {
            makeRequest,
            config,
            headers,
        Severity: Major
        Found in packages/adapter-axios/src/adapter/adapter.ts - About 2 hrs to fix

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

            const handleInvalidation = (invalidateKey: InvalidationKeyType) => {
              if (invalidateKey && invalidateKey instanceof Request) {
                cache.invalidate(getRequestKey(invalidateKey));
              } else if (invalidateKey && !(invalidateKey instanceof Request)) {
                cache.invalidate(invalidateKey);
          Severity: Major
          Found in packages/react/src/hooks/use-fetch/use-fetch.hooks.ts and 1 other location - About 2 hrs to fix
          packages/react/src/hooks/use-submit/use-submit.hooks.ts on lines 177..183

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

          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 handleInvalidation = (invalidateKey: InvalidationKeyType) => {
              if (invalidateKey && invalidateKey instanceof Request) {
                cache.invalidate(getRequestKey(invalidateKey));
              } else if (invalidateKey && !(invalidateKey instanceof Request)) {
                cache.invalidate(invalidateKey);
          Severity: Major
          Found in packages/react/src/hooks/use-submit/use-submit.hooks.ts and 1 other location - About 2 hrs to fix
          packages/react/src/hooks/use-fetch/use-fetch.hooks.ts on lines 127..133

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

          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

          export const getRealtimeDbAdminMethods = <R extends RequestInstance>(
            request: R,
            database: Database,
            url: string,
            onSuccess,
          packages/adapter-firebase-admin/src/firestore/firestore.methods.ts on lines 14..86
          packages/adapter-firebase/src/firestore/firestore.methods.ts on lines 25..104
          packages/adapter-firebase/src/realtime/realtime.methods.ts on lines 14..78

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

          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

          export const getFirestoreBrowserMethods = <R extends RequestInstance>(
            request: R,
            database: Firestore,
            url: string,
            onSuccess,
          packages/adapter-firebase-admin/src/firestore/firestore.methods.ts on lines 14..86
          packages/adapter-firebase-admin/src/realtime/realtime.methods.ts on lines 14..74
          packages/adapter-firebase/src/realtime/realtime.methods.ts on lines 14..78

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

          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

          export const getFirestoreAdminMethods = <R extends RequestInstance>(
            request: R,
            database: Firestore,
            url: string,
            onSuccess,
          packages/adapter-firebase-admin/src/realtime/realtime.methods.ts on lines 14..74
          packages/adapter-firebase/src/firestore/firestore.methods.ts on lines 25..104
          packages/adapter-firebase/src/realtime/realtime.methods.ts on lines 14..78

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

          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

            : ExtractEmitterHasParamsType<Emitter> extends false
            ? (
                options: EmitDataType<ExtractEmitterPayloadType<Emitter>, ExtractEmitterHasParamsType<Emitter>> &
                  EmitParamsType<ExtractRouteParams<ExtractEmitterEndpointType<Emitter>>, ExtractEmitterHasParamsType<Emitter>> &
                  EmitRestType<Emitter>,
          Severity: Major
          Found in packages/sockets/src/emitter/emitter.types.ts and 2 other locations - About 2 hrs to fix
          packages/sockets/src/emitter/emitter.types.ts on lines 48..70
          packages/sockets/src/emitter/emitter.types.ts on lines 54..70

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 76.

          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

            : ExtractRouteParams<ExtractEmitterEndpointType<Emitter>> extends NegativeTypes
            ? (
                options?: EmitDataType<ExtractEmitterPayloadType<Emitter>, ExtractEmitterHasParamsType<Emitter>> &
                  EmitParamsType<ExtractRouteParams<ExtractEmitterEndpointType<Emitter>>, ExtractEmitterHasParamsType<Emitter>> &
                  EmitRestType<Emitter>,
          Severity: Major
          Found in packages/sockets/src/emitter/emitter.types.ts and 2 other locations - About 2 hrs to fix
          packages/sockets/src/emitter/emitter.types.ts on lines 48..70
          packages/sockets/src/emitter/emitter.types.ts on lines 60..70

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 76.

          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 {
              makeRequest,
              fullUrl,
              config,
              headers,
          Severity: Major
          Found in packages/core/src/adapter/adapter.server.ts and 1 other location - About 2 hrs to fix
          packages/sockets/src/adapter/adapter.bindings.ts on lines 141..157

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

          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

          export const getRealtimeDbBrowserMethods = <R extends RequestInstance>(
            request: R,
            database: Database,
            url: string,
            onSuccess,
          Severity: Major
          Found in packages/adapter-firebase/src/realtime/realtime.methods.ts and 3 other locations - About 2 hrs to fix
          packages/adapter-firebase-admin/src/firestore/firestore.methods.ts on lines 14..86
          packages/adapter-firebase-admin/src/realtime/realtime.methods.ts on lines 14..74
          packages/adapter-firebase/src/firestore/firestore.methods.ts on lines 25..104

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

          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