unepwcmc/SAPI

View on GitHub
app/assets/javascripts/cites_trade/application.js

Summary

Maintainability
F
5 days
Test Coverage

File application.js has 724 lines of code (exceeds 250 allowed). Consider refactoring.
Open

$(document).ready(function(){

  var ajaxFail, initExpctyImpcty, initTerms, initSources, initPurposes,
    countries = {}, units = {}, terms = {}, purposes = {}, sources = {},
    euId = '',
Severity: Major
Found in app/assets/javascripts/cites_trade/application.js - About 1 day to fix

    Function handleDownloadRequest has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function handleDownloadRequest (ignoreWarning) {
        var output_type = $( "input[name='outputType']:checked" ).val(),
          report_type = $( "input[name='report']:checked" ).val(),
          csv_separator = $( "select[name='csvSeparator']" ).val(),
          query = location.search.substr(1);
    Severity: Minor
    Found in app/assets/javascripts/cites_trade/application.js - About 1 hr to fix

      Function queryResults has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function queryResults () {
          var href, values, params, $link;
          if (queryResults.ajax) {
            getResultsCount(getParamsFromInputs()).then( function (res) {
              if (res.total > res.csv_limit){
      Severity: Minor
      Found in app/assets/javascripts/cites_trade/application.js - About 1 hr to fix

        Function displayResults has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function displayResults (q) {
            var table_view_title, formURL = '/' + locale + '/cites_trade/shipments',
              data_headers, data_rows, table_tmpl,
              comptab_regex = /comptab/,
              gross_net_regex = /(gross_exports|gross_imports|net_exports|net_imports)/;
        Severity: Minor
        Found in app/assets/javascripts/cites_trade/application.js - About 1 hr to fix

          Function parseTaxonCascadeData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function parseTaxonCascadeData(data, term, showSpp) {
              var d = data.auto_complete_taxon_concepts;
              var data_by_rank = [];
              var currentRank = d[0].rank_name;
              data_by_rank.push({
          Severity: Minor
          Found in app/assets/javascripts/cites_trade/application.js - About 1 hr to fix

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

                var selection = $('#sources'),
                  args = {
                    selection: selection,
                    data: data.sources,
                    condition: function (item) {return item.code},
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 3 hrs to fix
            app/assets/javascripts/cites_trade/application.js on lines 333..341
            app/assets/javascripts/cites_trade/application.js on lines 408..416

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

            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

                var selection = $('#terms'),
                  args = {
                    selection: selection,
                    data: data.terms,
                    condition: function (item) {return item.code},
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 3 hrs to fix
            app/assets/javascripts/cites_trade/application.js on lines 371..379
            app/assets/javascripts/cites_trade/application.js on lines 408..416

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

            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

                var selection = $('#purposes'),
                  args = {
                    selection: selection,
                    data: data.purposes,
                    condition: function (item) {return item.code},
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 3 hrs to fix
            app/assets/javascripts/cites_trade/application.js on lines 333..341
            app/assets/javascripts/cites_trade/application.js on lines 371..379

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

            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

              function goToResults (q) {
                var $link = $('#view_genie'),
                  href = '/' + locale + '/cites_trade/download/view_results?' + q;
                $link.attr('href', href).click();
                window.location.href = $link.attr("href");
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/cites_trade/application.js on lines 758..763

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

            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

              function downloadResults (q) {
                var $link = $('#download_genie'),
                  href = '/' + locale + '/cites_trade/exports/download?' + q;
                $link.attr('href', href).click();
                window.location.href = $link.attr("href");
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/cites_trade/application.js on lines 751..756

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

            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

                  if (e.val.length > 1)
                  {
                    new_array = new Array();
                    new_array = checkforAllOptions(prop, alloption);
                    $(this).select2('data', new_array);
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 396..402
            app/assets/javascripts/cites_trade/application.js on lines 432..437

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

            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

                  if (e.val.length > 1) {
                    new_array = new Array();
                    new_array = checkforAllOptions(prop, alloption);
                    $(this).select2('data', new_array);
                    selection = getText(new_array);
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 359..365
            app/assets/javascripts/cites_trade/application.js on lines 396..402

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

            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

                  if (e.val.length > 1)
                  {
                    new_array = new Array();
                    new_array = checkforAllOptions(prop, alloption);
                    $(this).select2('data', new_array);
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 2 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 359..365
            app/assets/javascripts/cites_trade/application.js on lines 432..437

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

            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

              initSourcesObj = function (data) {
                _.each(data.sources, function (source) {
                  sources[source.id] = source;
                });
                unLock('initSourcesObj');
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 198..203
            app/assets/javascripts/cites_trade/application.js on lines 216..221
            app/assets/javascripts/cites_trade/application.js on lines 223..228

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

            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

              initUnitsObj = function (data) {
                _.each(data.units, function (unit) {
                  units[unit.id] = unit;
                });
                unLock('initUnitsObj');
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 216..221
            app/assets/javascripts/cites_trade/application.js on lines 223..228
            app/assets/javascripts/cites_trade/application.js on lines 230..235

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

            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

              initTermsObj = function (data) {
                _.each(data.terms, function (term) {
                  terms[term.id] = term;
                });
                unLock('initTermsObj');
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 198..203
            app/assets/javascripts/cites_trade/application.js on lines 223..228
            app/assets/javascripts/cites_trade/application.js on lines 230..235

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

            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

              initPurposesObj = function (data) {
                _.each(data.purposes, function (purpose) {
                  purposes[purpose.id] = purpose;
                });
                unLock('initPurposesObj');
            Severity: Major
            Found in app/assets/javascripts/cites_trade/application.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/cites_trade/application.js on lines 198..203
            app/assets/javascripts/cites_trade/application.js on lines 216..221
            app/assets/javascripts/cites_trade/application.js on lines 230..235

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

            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 (e.val.length == 0) {
                    $(this).select2("val","all_exp");
                    allOptionsDictionary["all_exp"] = true;
                  }
            Severity: Minor
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/cites_trade/application.js on lines 314..317

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

            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

                  if (e.val.length == 0) {
                    $(this).select2("val", alloption);
                    allOptionsDictionary[alloption] = true;
                  }
            Severity: Minor
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/cites_trade/application.js on lines 426..429

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

            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 (e.val.length == 0) {
                    $(this).select2("val","all_imp");
                    allOptionsDictionary["all_imp"] = true;
                  }
            Severity: Minor
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/cites_trade/application.js on lines 286..289

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

            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

                  if (e.val.length == 0) {
                    $(this).select2("val", alloption);
                    allOptionsDictionary[alloption] = true;
                  }
            Severity: Minor
            Found in app/assets/javascripts/cites_trade/application.js and 1 other location - About 35 mins to fix
            app/assets/javascripts/cites_trade/application.js on lines 390..393

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

            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

            There are no issues that match your filters.

            Category
            Status