historyforge/historyforge

View on GitHub

Showing 347 of 347 total issues

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

                          <button type="button"
                                  id="forge-picker-toggle"
                                  className="btn btn-primary"
                                  onClick={(e) => {
                                    e.stopPropagation();
Severity: Major
Found in app/javascript/forge/App.tsx and 2 other locations - About 2 hrs to fix
app/javascript/forge/App.tsx on lines 106..116
app/javascript/forge/App.tsx on lines 117..127

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

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

                        <button type="button"
                                id="forge-sidebar-left-toggle"
                                className="btn btn-primary"
                                onClick={(e) => {
                                    e.stopPropagation();
Severity: Major
Found in app/javascript/forge/App.tsx and 2 other locations - About 2 hrs to fix
app/javascript/forge/App.tsx on lines 94..104
app/javascript/forge/App.tsx on lines 117..127

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

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

            {sidebarRight && (
                <div id="forge-right-col" className="open">
                    <button type="button"
                            id="forge-sidebar-right-closer"
                            className="btn btn-primary"
Severity: Major
Found in app/javascript/forge/App.tsx and 1 other location - About 2 hrs to fix
app/javascript/forge/App.tsx on lines 61..69

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

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

                        <button type="button"
                                id="forge-sidebar-right-toggle"
                                className="btn btn-primary"
                                onClick={(e) => {
                                    e.stopPropagation();
Severity: Major
Found in app/javascript/forge/App.tsx and 2 other locations - About 2 hrs to fix
app/javascript/forge/App.tsx on lines 94..104
app/javascript/forge/App.tsx on lines 106..116

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

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

Method scope_fields_for has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

  def self.scope_fields_for(year)
    with_options edit_only: true do
      divider 'Census Scope'
      input :page_number, as: :integer, min: 0, max: 10_000, facet: false
      input :page_side, as: :select, facet: false if year > 1870 && year < 1950
Severity: Minor
Found in app/services/census_form_field_config.rb - 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 FileChecksum has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        var FileChecksum = function() {
          createClass(FileChecksum2, null, [{
            key: "create",
            value: function create(file, callback) {
              var instance = new FileChecksum2(file);
Severity: Major
Found in app/assets/builds/richtext.js - About 2 hrs to fix

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

                  }, c.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment = function(t3, e2) {
                    var n2;
                    return (n2 = this.delegate) != null && typeof n2.compositionControllerWillUpdateAttachment == "function" && n2.compositionControllerWillUpdateAttachment(e2), this.composition.updateAttributesForAttachment(t3, e2);
                  }, c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function(t3, e2) {
    Severity: Major
    Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
    app/assets/builds/richtext.js on lines 2779..2782

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

    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

                  }, c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function(t3, e2) {
                    var n2;
                    return (n2 = this.delegate) != null && typeof n2.compositionControllerWillUpdateAttachment == "function" && n2.compositionControllerWillUpdateAttachment(e2), this.composition.removeAttributeForAttachment(t3, e2);
                  }, c.prototype.attachmentEditorDidRequestRemovalOfAttachment = function(t3) {
    Severity: Major
    Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
    app/assets/builds/richtext.js on lines 2776..2779

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

    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

    Consider simplifying this complex logical expression.
    Open

                  if (i2 && i2.type === "childList" && i2.addedNodes && i2.addedNodes) {
                    for (var o2 = i2.addedNodes[0]; o2 && o2 !== document && !o2.host; )
                      o2 = o2.parentNode;
                    var r2 = o2 && (o2.URL || o2._URL || o2.host && o2.host.localName) || "";
                    r2 = r2.split("/?").shift().split("/").pop();
    Severity: Critical
    Found in app/assets/builds/richtext.js - About 2 hrs to fix

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

            if (url.match(/building/)) { this.what = 'building' } else if (url.match(/census/)) { this.what = 'census' } else if (url.match(/people/)) { this.what = 'people' }
      Severity: Major
      Found in app/javascript/controllers/saved_searches_controller.js and 1 other location - About 2 hrs to fix
      app/javascript/controllers/load_saved_search_controller.js on lines 8..8

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

      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 (url.match(/buildings/)) { this.what = 'building' } else if (url.match(/\/census/)) { this.what = 'census' } else if (url.match(/people/)) { this.what = 'people' }
      Severity: Major
      Found in app/javascript/controllers/load_saved_search_controller.js and 1 other location - About 2 hrs to fix
      app/javascript/controllers/saved_searches_controller.js on lines 8..8

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

      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

      Class MainController has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class Buildings::MainController < ApplicationController
        include AdvancedRestoreSearch
        include RenderCsv
      
        wrap_parameters format: []
      Severity: Minor
      Found in app/controllers/buildings/main_controller.rb - About 2 hrs to fix

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

                    e.Piece = function(n2) {
                      function i(t3, n3) {
                        n3 == null && (n3 = {}), i.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n3);
                      }
                      return t2(i, n2), i.types = {}, i.registerType = function(t3, e2) {
        Severity: Major
        Found in app/assets/builds/richtext.js - About 2 hrs to fix

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

                        }, d.prototype.attachmentDidChangePreviewURL = function(t3) {
                          var e2;
                          return this.revision++, (e2 = this.delegate) != null && typeof e2.compositionDidChangeAttachmentPreviewURL == "function" ? e2.compositionDidChangeAttachmentPreviewURL(t3) : void 0;
                        }, d.prototype.editAttachment = function(t3, e2) {
          Severity: Major
          Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
          app/assets/builds/richtext.js on lines 4481..4484

          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

                        }, d.prototype.attachmentDidChangeAttributes = function(t3) {
                          var e2;
                          return this.revision++, (e2 = this.delegate) != null && typeof e2.compositionDidEditAttachment == "function" ? e2.compositionDidEditAttachment(t3) : void 0;
                        }, d.prototype.attachmentDidChangePreviewURL = function(t3) {
          Severity: Major
          Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
          app/assets/builds/richtext.js on lines 4484..4487

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

                  var DirectUploadsController = function() {
                    function DirectUploadsController2(form) {
                      classCallCheck(this, DirectUploadsController2);
                      this.form = form;
                      this.inputs = findElements(form, inputSelector).filter(function(input) {
          Severity: Major
          Found in app/assets/builds/richtext.js - About 2 hrs to fix

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

                        }, g = {}.hasOwnProperty, m = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
            Severity: Major
            Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
            app/assets/builds/richtext.js on lines 907..912
            app/assets/builds/richtext.js on lines 1554..1559
            app/assets/builds/richtext.js on lines 1683..1688
            app/assets/builds/richtext.js on lines 2087..2092
            app/assets/builds/richtext.js on lines 3480..3485
            app/assets/builds/richtext.js on lines 3632..3637
            app/assets/builds/richtext.js on lines 3698..3703
            app/assets/builds/richtext.js on lines 3896..3901
            app/assets/builds/richtext.js on lines 4850..4855
            app/assets/builds/richtext.js on lines 5193..5198

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

                        }, d = {}.hasOwnProperty, f = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
            Severity: Major
            Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
            app/assets/builds/richtext.js on lines 907..912
            app/assets/builds/richtext.js on lines 1554..1559
            app/assets/builds/richtext.js on lines 1683..1688
            app/assets/builds/richtext.js on lines 1875..1880
            app/assets/builds/richtext.js on lines 2087..2092
            app/assets/builds/richtext.js on lines 3480..3485
            app/assets/builds/richtext.js on lines 3632..3637
            app/assets/builds/richtext.js on lines 3896..3901
            app/assets/builds/richtext.js on lines 4850..4855
            app/assets/builds/richtext.js on lines 5193..5198

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

                        }, s = {}.hasOwnProperty, a = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
            Severity: Major
            Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
            app/assets/builds/richtext.js on lines 907..912
            app/assets/builds/richtext.js on lines 1554..1559
            app/assets/builds/richtext.js on lines 1683..1688
            app/assets/builds/richtext.js on lines 1875..1880
            app/assets/builds/richtext.js on lines 3480..3485
            app/assets/builds/richtext.js on lines 3632..3637
            app/assets/builds/richtext.js on lines 3698..3703
            app/assets/builds/richtext.js on lines 3896..3901
            app/assets/builds/richtext.js on lines 4850..4855
            app/assets/builds/richtext.js on lines 5193..5198

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

                        }, c = {}.hasOwnProperty, l = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
            Severity: Major
            Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
            app/assets/builds/richtext.js on lines 907..912
            app/assets/builds/richtext.js on lines 1554..1559
            app/assets/builds/richtext.js on lines 1875..1880
            app/assets/builds/richtext.js on lines 2087..2092
            app/assets/builds/richtext.js on lines 3480..3485
            app/assets/builds/richtext.js on lines 3632..3637
            app/assets/builds/richtext.js on lines 3698..3703
            app/assets/builds/richtext.js on lines 3896..3901
            app/assets/builds/richtext.js on lines 4850..4855
            app/assets/builds/richtext.js on lines 5193..5198

            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

            Severity
            Category
            Status
            Source
            Language