codenautas/txt-to-sql

View on GitHub

Showing 405 of 405 total issues

Avoid deeply nested control flow statements.
Open

                    if(brokenLine.lines.length===1) {
                        errors.push(txtToSql.errString(info, 'errBadRow',[ln, firstLine.length, numColumns]));
                    } else {
                        errors.push(txtToSql.errString(info, 'errBadRowMulti', [parseInt(brokenLine.num+linesJoined+1,10),
                                                                                parseInt(ln+linesJoined,10),
Severity: Major
Found in lib/txt-to-sql.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if (idx != -1) {
                        var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
                        newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
                        newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
                        newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
    Severity: Major
    Found in web/iconv-lite.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if(separated.length>1) {
                              brokenLine.cols += separated.length-1;
                          }
      Severity: Major
      Found in lib/txt-to-sql.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
                            var len = 0xFFF - code + 2;
                            var seq = [];
                            for (var m = 0; m < len; m++)
                                seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
        Severity: Major
        Found in web/iconv-lite.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if(lines[ln].substr(0, info.opts.separator.length) !== info.opts.separator) {
                                  brokenLine.lines.push('\n');
                              }
          Severity: Major
          Found in lib/txt-to-sql.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                    } else if (i + 1 === length) {
                      // unpaired lead
                      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                      continue
                    }
            Severity: Major
            Found in web/iconv-lite.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                          if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
                            codePoint = tempCodePoint
                          }
              Severity: Major
              Found in web/iconv-lite.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
                              codePoint = tempCodePoint
                            }
                Severity: Major
                Found in web/iconv-lite.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                        if ((units -= 3) < 0) break
                  Severity: Major
                  Found in web/iconv-lite.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                        } else if (codePoint < 0x110000) {
                          if ((units -= 4) < 0) break
                          bytes.push(
                            codePoint >> 0x12 | 0xF0,
                            codePoint >> 0xC & 0x3F | 0x80,
                    Severity: Major
                    Found in web/iconv-lite.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                      Severity: Major
                      Found in web/iconv-lite.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    if (tempCodePoint > 0x7F) {
                                      codePoint = tempCodePoint
                                    }
                        Severity: Major
                        Found in web/iconv-lite.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if (accBytes === 2 && acc < 0x80 && acc > 0)
                                                  res += this.defaultCharUnicode;
                                              else if (accBytes === 3 && acc < 0x800)
                                                  res += this.defaultCharUnicode;
                                              else
                          Severity: Major
                          Found in web/iconv-lite.js - About 45 mins to fix

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

                                "checked": {
                                    "tags": {
                                        "menuitem": {"description": "Whether the command or control is checked","value": "Boolean attribute"},
                                        "input": {"description": "Whether the command or control is checked","value": "Boolean attribute"}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "default": {
                                    "tags": {
                                        "menuitem": {"description": "Mark the command as being a default command","value": "Boolean attribute"},
                                        "track": {"description": "Enable the track if no other text track is more suitable","value": "Boolean attribute"}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "maxlength": {
                                    "tags": {
                                        "input": {"description": "Maximum length of value","value": "Valid non-negative integer"},
                                        "textarea": {"description": "Maximum length of value","value": "Valid non-negative integer"}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "colspan": {
                                    "tags": {
                                        "td": {"description": "Number of columns that the cell is to span","value": "Valid non-negative integer greater than zero"},
                                        "th": {"description": "Number of columns that the cell is to span","value": "Valid non-negative integer greater than zero"}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "dir": {
                                    "tags": {
                                        "HTML elements": {"description": "The text directionality of the element","value": "\"ltr\"; \"rtl\"; \"auto\""},
                                        "bdo": {"description": "The text directionality of the element","value": "\"ltr\"; \"rtl\""}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "formmethod": {
                                    "tags": {
                                        "button": {"description": "HTTP method to use for form submission","value": "\"GET\"; \"POST\""},
                                        "input": {"description": "HTTP method to use for form submission","value": "\"GET\"; \"POST\""}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 992..998
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

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

                                "min": {
                                    "tags": {
                                        "input": {"description": "Minimum value","value": "Varies*"},
                                        "meter": {"description": "Lower bound of range","value": "Valid floating-point number*"}
                                    },
                            Severity: Major
                            Found in web/js-to-html.js and 34 other locations - About 40 mins to fix
                            web/js-to-html.js on lines 553..559
                            web/js-to-html.js on lines 566..572
                            web/js-to-html.js on lines 573..579
                            web/js-to-html.js on lines 604..610
                            web/js-to-html.js on lines 629..635
                            web/js-to-html.js on lines 666..672
                            web/js-to-html.js on lines 679..685
                            web/js-to-html.js on lines 686..692
                            web/js-to-html.js on lines 707..713
                            web/js-to-html.js on lines 754..760
                            web/js-to-html.js on lines 761..767
                            web/js-to-html.js on lines 768..774
                            web/js-to-html.js on lines 775..781
                            web/js-to-html.js on lines 782..788
                            web/js-to-html.js on lines 789..795
                            web/js-to-html.js on lines 829..835
                            web/js-to-html.js on lines 854..860
                            web/js-to-html.js on lines 932..938
                            web/js-to-html.js on lines 959..965
                            web/js-to-html.js on lines 966..972
                            web/js-to-html.js on lines 973..979
                            web/js-to-html.js on lines 999..1005
                            web/js-to-html.js on lines 1006..1012
                            web/js-to-html.js on lines 1013..1019
                            web/js-to-html.js on lines 1038..1044
                            web/js-to-html.js on lines 1051..1057
                            web/js-to-html.js on lines 1070..1076
                            web/js-to-html.js on lines 1077..1083
                            web/js-to-html.js on lines 1090..1096
                            web/js-to-html.js on lines 1103..1109
                            web/js-to-html.js on lines 1138..1144
                            web/js-to-html.js on lines 1187..1193
                            web/js-to-html.js on lines 1212..1218
                            web/js-to-html.js on lines 1326..1332

                            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