Kinvey/js-sdk

View on GitHub

Showing 349 of 349 total issues

File networkstore.ts has 335 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { isArray, cloneDeep } from 'lodash-es';
import { Observable } from 'rxjs';
import { getDeviceId } from '../device';
import { Aggregation } from '../aggregation';
import { Query } from '../query';
Severity: Minor
Found in packages/js-sdk/src/datastore/networkstore.ts - About 4 hrs to fix

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

      addReader(reader: string) {
        const r = this.readers;
    
        if (r.indexOf(reader) === -1) {
          r.push(reader);
    Severity: Major
    Found in packages/js-sdk/src/acl.ts and 1 other location - About 4 hrs to fix
    packages/js-sdk/src/acl.ts on lines 138..151

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

    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

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

    export class DataStoreService {
      constructor(@Inject(KinveyConfigToken) config: any) {
        init(config);
      }
    
    
    Severity: Major
    Found in packages/angular-sdk/src/datastore.service.ts and 1 other location - About 4 hrs to fix
    packages/nativescript-sdk/src/angular/datastore.service.ts on lines 8..20

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

    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

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

    export class DataStoreService {
      constructor(@Inject(KinveyConfigToken) config: any) {
        init(config);
      }
    
    
    Severity: Major
    Found in packages/nativescript-sdk/src/angular/datastore.service.ts and 1 other location - About 4 hrs to fix
    packages/angular-sdk/src/datastore.service.ts on lines 9..21

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

    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

      addWriter(writer: string) {
        const w = this.writers;
    
        if (w.indexOf(writer) === -1) {
          w.push(writer);
    Severity: Major
    Found in packages/js-sdk/src/acl.ts and 1 other location - About 4 hrs to fix
    packages/js-sdk/src/acl.ts on lines 96..109

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

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

      async execute(retry = true): Promise<HttpResponse> {
        if (this.auth) {
          await this.headers.setAuthorization(this.auth);
        }
    
    
    Severity: Minor
    Found in packages/js-sdk/src/http/request.ts - About 3 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

    File sync.ts has 320 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { Query } from '../query';
    import { SyncError } from '../errors/sync';
    import { NotFoundError } from '../errors/notFound';
    import { NetworkStore } from './networkstore';
    import { DataStoreCache, SyncCache, SyncEvent } from './cache';
    Severity: Minor
    Found in packages/js-sdk/src/datastore/sync.ts - About 3 hrs to fix

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

        async regenerateRecoveryCodes(): Promise<string[]> {
          const request = new KinveyHttpRequest({
            method: HttpRequestMethod.POST,
            auth: KinveyHttpAuth.SessionOrMaster,
            url: formatKinveyBaasUrl(KinveyBaasNamespace.User, `/${this._id}/recovery-codes`),
      Severity: Major
      Found in packages/js-sdk/src/user/user.ts and 1 other location - About 3 hrs to fix
      packages/js-sdk/src/user/user.ts on lines 263..272

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

      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

        async listRecoveryCodes(): Promise<string[]> {
          const request = new KinveyHttpRequest({
            method: HttpRequestMethod.GET,
            auth: KinveyHttpAuth.SessionOrMaster,
            url: formatKinveyBaasUrl(KinveyBaasNamespace.User, `/${this._id}/recovery-codes`),
      Severity: Major
      Found in packages/js-sdk/src/user/user.ts and 1 other location - About 3 hrs to fix
      packages/js-sdk/src/user/user.ts on lines 274..283

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

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

        get error() {
          if (!this.isSuccess()) {
            if (isPlainObject(this.data)) {
              const message = this.data.message || this.data.description;
              const name = this.data.name || this.data.error;
      Severity: Major
      Found in packages/js-sdk/src/http/response.ts - About 3 hrs to fix

        Function _pullInternal has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async _pullInternal(query: Query = new Query(), pullOptions: any = {}, options: { paginationCountsOnly?: boolean } = {}) : Promise<any[]|number> {
            const network = new NetworkStore(this.collectionName);
            const cache = new DataStoreCache(this.collectionName, this.tag);
            const queryCache = new QueryCache(this.tag);
            const useDeltaSet = pullOptions.useDeltaSet === true || this.useDeltaSet;
        Severity: Major
        Found in packages/js-sdk/src/datastore/cachestore.ts - About 3 hrs to fix

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

          export function init(config: KinveyConfig) {
            const kinveyConfig = coreInit({
              kinveyConfig: config,
              httpAdapter: HttpAdapter,
              sessionStore: SessionStore,
          Severity: Major
          Found in packages/html5-sdk/src/init.ts and 1 other location - About 3 hrs to fix
          packages/node-sdk/src/init.ts on lines 16..26

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 101.

          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

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

          export function init(config: KinveyConfig) {
            const kinveyConfig = coreInit({
              kinveyConfig: config,
              httpAdapter: HttpAdapter,
              sessionStore: SessionStore,
          Severity: Major
          Found in packages/node-sdk/src/init.ts and 1 other location - About 3 hrs to fix
          packages/html5-sdk/src/init.ts on lines 17..27

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

          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

              try {
                const network = new NetworkStore(this.collectionName);
                const count = await network.count(query, options).toPromise();
                return count;
              } catch (error) {
          Severity: Major
          Found in packages/js-sdk/src/datastore/autostore.ts and 1 other location - About 3 hrs to fix
          packages/js-sdk/src/datastore/autostore.ts on lines 71..82

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

          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

              try {
                const network = new NetworkStore(this.collectionName);
                const result = await network.group(aggregation, options).toPromise();
                return result;
              } catch (error) {
          Severity: Major
          Found in packages/js-sdk/src/datastore/autostore.ts and 1 other location - About 3 hrs to fix
          packages/js-sdk/src/datastore/autostore.ts on lines 52..63

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 101.

          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

          Identical blocks of code found in 5 locations. Consider refactoring.
          Open

          export async function save(dbName: string, tableName: string, docs: any = []) {
            const table = getTable(dbName, tableName);
            docs.forEach((doc: { _id: string; }) => {
              table.set(doc._id, doc);
            });
          Severity: Major
          Found in packages/node-sdk/src/storage/memory.ts and 4 other locations - About 3 hrs to fix
          packages/html5-sdk/src/storage/localstorage.ts on lines 38..45
          packages/html5-sdk/src/storage/memory.ts on lines 26..33
          packages/html5-sdk/src/storage/sessionstorage.ts on lines 38..45
          packages/react-native-sdk/src/storage/memory.ts on lines 26..33

          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

          Identical blocks of code found in 5 locations. Consider refactoring.
          Open

          export async function save(dbName: string, tableName: string, docs: any = []) {
            const table = getTable(dbName, tableName);
            docs.forEach((doc: { _id: string; }) => {
              table.set(doc._id, doc);
            });
          Severity: Major
          Found in packages/html5-sdk/src/storage/sessionstorage.ts and 4 other locations - About 3 hrs to fix
          packages/html5-sdk/src/storage/localstorage.ts on lines 38..45
          packages/html5-sdk/src/storage/memory.ts on lines 26..33
          packages/node-sdk/src/storage/memory.ts on lines 26..33
          packages/react-native-sdk/src/storage/memory.ts on lines 26..33

          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

          Identical blocks of code found in 5 locations. Consider refactoring.
          Open

          export async function save(dbName: string, tableName: string, docs: any = []) {
            const table = getTable(dbName, tableName);
            docs.forEach((doc: { _id: string; }) => {
              table.set(doc._id, doc);
            });
          Severity: Major
          Found in packages/html5-sdk/src/storage/localstorage.ts and 4 other locations - About 3 hrs to fix
          packages/html5-sdk/src/storage/memory.ts on lines 26..33
          packages/html5-sdk/src/storage/sessionstorage.ts on lines 38..45
          packages/node-sdk/src/storage/memory.ts on lines 26..33
          packages/react-native-sdk/src/storage/memory.ts on lines 26..33

          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

          Identical blocks of code found in 5 locations. Consider refactoring.
          Open

          export async function save(dbName: string, tableName: string, docs: any = []) {
            const table = getTable(dbName, tableName);
            docs.forEach((doc: { _id: string; }) => {
              table.set(doc._id, doc);
            });
          Severity: Major
          Found in packages/html5-sdk/src/storage/memory.ts and 4 other locations - About 3 hrs to fix
          packages/html5-sdk/src/storage/localstorage.ts on lines 38..45
          packages/html5-sdk/src/storage/sessionstorage.ts on lines 38..45
          packages/node-sdk/src/storage/memory.ts on lines 26..33
          packages/react-native-sdk/src/storage/memory.ts on lines 26..33

          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

          Identical blocks of code found in 5 locations. Consider refactoring.
          Open

          export async function save(dbName: string, tableName: string, docs: any = []) {
            const table = getTable(dbName, tableName);
            docs.forEach((doc: { _id: string }) => {
              table.set(doc._id, doc);
            });
          Severity: Major
          Found in packages/react-native-sdk/src/storage/memory.ts and 4 other locations - About 3 hrs to fix
          packages/html5-sdk/src/storage/localstorage.ts on lines 38..45
          packages/html5-sdk/src/storage/memory.ts on lines 26..33
          packages/html5-sdk/src/storage/sessionstorage.ts on lines 38..45
          packages/node-sdk/src/storage/memory.ts on lines 26..33

          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

          Severity
          Category
          Status
          Source
          Language