BookStackApp/BookStack

View on GitHub

Showing 1,485 of 1,485 total issues

Avoid deeply nested control flow statements.
Open

        if (canUseFastPath) {
          // Fast path for removing DOM nodes
          dom.textContent = '';
        }
Severity: Major
Found in resources/js/wysiwyg/lexical/core/LexicalReconciler.ts - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

              if (
                // eslint-disable-next-line no-prototype-builtins
                !klass.hasOwnProperty('importDOM') &&
                // eslint-disable-next-line no-prototype-builtins
                klass.hasOwnProperty('exportDOM')
    Severity: Major
    Found in resources/js/wysiwyg/lexical/core/LexicalEditor.ts - About 45 mins to fix

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

          editor.ui.registry.addButton('details', {
              icon: 'details',
              tooltip: 'Insert collapsible block',
              onAction() {
                  editor.execCommand('InsertDetailsBlock');
      Severity: Major
      Found in resources/js/wysiwyg-tinymce/plugins-details.js and 3 other locations - About 45 mins to fix
      resources/js/wysiwyg-tinymce/plugin-codeeditor.js on lines 161..167
      resources/js/wysiwyg-tinymce/plugin-codeeditor.js on lines 169..175
      resources/js/wysiwyg-tinymce/plugins-customhr.js on lines 12..18

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

      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

      Avoid deeply nested control flow statements.
      Open

                if (
                  // eslint-disable-next-line no-prototype-builtins
                  !klass.hasOwnProperty('importJSON')
                ) {
                  console.warn(
      Severity: Major
      Found in resources/js/wysiwyg/lexical/core/LexicalEditor.ts - About 45 mins to fix

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

          beforeEach(async () => {
            container = document.createElement('div');
            document.body.appendChild(container);
            await init();
          });
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalElementNode.test.ts on lines 28..33
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTextNode.test.ts on lines 66..71

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

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

          beforeEach(async () => {
            container = document.createElement('div');
            document.body.appendChild(container);
        
            await init();
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalElementNode.test.ts on lines 28..33
        resources/js/wysiwyg/lexical/utils/__tests__/unit/LexicalEventHelpers.test.ts on lines 67..71

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

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

          beforeEach(async () => {
            container = document.createElement('div');
            document.body.appendChild(container);
        
            await init();
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTextNode.test.ts on lines 66..71
        resources/js/wysiwyg/lexical/utils/__tests__/unit/LexicalEventHelpers.test.ts on lines 67..71

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

        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

                await editor.update(() => {
                  barTextNode = new TextNode('bar');
                  barTextNode.toggleUnmergeable();
                  paragraphNode.append(barTextNode);
                });
        resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalNode.test.ts on lines 726..730

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

        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 editor.update(() => {
                  const node = new LexicalNode();
                  expect(node.getParent()).toBe(null);
                });
        resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalNode.test.ts on lines 582..585

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

        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 editor.update(() => {
                  const node = new LexicalNode();
                  expect(node.getTopLevelElement()).toBe(null);
                });
        resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalNode.test.ts on lines 550..553

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

        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

                await editor.update(() => {
                  barTextNode = new TextNode('bar');
                  barTextNode.toggleUnmergeable();
                  paragraphNode.append(barTextNode);
                });
        resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalNode.test.ts on lines 663..667

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

        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

                if (this.trigger) {
                    this.trigger.addEventListener('click', this.toggle.bind(this));
                    this.openIfContainsError();
                }
        Severity: Minor
        Found in resources/js/components/collapsible.js and 1 other location - About 40 mins to fix
        resources/js/components/new-user-password.js on lines 10..13

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

        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

                if (this.inviteOption) {
                    this.inviteOption.addEventListener('change', this.inviteOptionChange.bind(this));
                    this.inviteOptionChange();
                }
        Severity: Minor
        Found in resources/js/components/new-user-password.js and 1 other location - About 40 mins to fix
        resources/js/components/collapsible.js on lines 15..18

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

        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

            if ($isElementNode(firstNode)) {
              const firstNodeDescendant =
                firstNode.getDescendantByIndex<ElementNode>(startOffset);
              firstNode = firstNodeDescendant != null ? firstNodeDescendant : firstNode;
            }
        Severity: Major
        Found in resources/js/wysiwyg/lexical/core/LexicalSelection.ts and 2 other locations - About 40 mins to fix
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 118..121
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 122..125

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

        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

            if ($isElementNode(aNode)) {
              const aNodeDescendant = aNode.getDescendantByIndex<ElementNode>(aOffset);
              aNode = aNodeDescendant != null ? aNodeDescendant : aNode;
            }
        Severity: Major
        Found in resources/js/wysiwyg/lexical/core/LexicalSelection.ts and 2 other locations - About 40 mins to fix
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 122..125
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 478..482

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

        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

            if ($isElementNode(bNode)) {
              const bNodeDescendant = bNode.getDescendantByIndex<ElementNode>(bOffset);
              bNode = bNodeDescendant != null ? bNodeDescendant : bNode;
            }
        Severity: Major
        Found in resources/js/wysiwyg/lexical/core/LexicalSelection.ts and 2 other locations - About 40 mins to fix
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 118..121
        resources/js/wysiwyg/lexical/core/LexicalSelection.ts on lines 478..482

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

        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

              await editor.update(() => {
                const selection = $getSelection();
                invariant($isRangeSelection(selection), 'isRangeSelection(selection)');
                $insertDataTransferForRichText(dataTransfer, selection, editor);
              });
        resources/js/wysiwyg/lexical/core/__tests__/unit/HTMLCopyAndPaste.test.ts on lines 102..109
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTabNode.test.ts on lines 66..70
        resources/js/wysiwyg/lexical/table/__tests__/unit/LexicalTableNode.test.ts on lines 130..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 49.

        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 function isMoveUp(
          key: string,
          ctrlKey: boolean,
          metaKey: boolean,
        ): boolean {
        Severity: Minor
        Found in resources/js/wysiwyg/lexical/core/LexicalUtils.ts and 1 other location - About 40 mins to fix
        resources/js/wysiwyg/lexical/core/LexicalUtils.ts on lines 1015..1021

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

        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

                  await editor.update(() => {
                    const selection = $getSelection();
                    invariant(
                      $isRangeSelection(selection),
                      'isRangeSelection(selection)',
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTabNode.test.ts on lines 66..70
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTabNode.test.ts on lines 104..108
        resources/js/wysiwyg/lexical/table/__tests__/unit/LexicalTableNode.test.ts on lines 130..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 49.

        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

              [
                'no change in tags',
                {
                  format: IS_BOLD,
                  mode: 'normal',
        resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTextNode.test.ts on lines 733..750

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

        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