codenautas/txt-to-sql

View on GitHub

Showing 200 of 405 total issues

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 (0xDC00 <= codeTrail && codeTrail < 0xE000)
                            writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
                        else
                            throw new Error("Incorrect surrogate pair in "  + this.encodingName + " at chunk " + chunk[0]);
    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

            } 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

                  } 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

                            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 (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

                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

                                      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

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

                        Consider simplifying this complex logical expression.
                        Open

                            if(match){
                                var integerParts={};
                                integerParts.year    = parseInt(match[2],10)
                                integerParts.month   = parseInt(match[4],10)
                                integerParts.day     = parseInt(match[7],10)
                        Severity: Major
                        Found in web/best-globals.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if(original===null ||
                                  !bestGlobals.isPlainObject(original) &&
                                      !(original instanceof Error) &&
                                      (!opts.mostlyPlain || typeof original != "object" || !bestGlobals.isPlainObject(changes))
                                   // && !bestGlobals.changing
                          Severity: Major
                          Found in web/best-globals.js - About 40 mins to fix

                            Function writeFloat has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function writeFloat (buf, value, offset, littleEndian, noAssert) {
                            Severity: Minor
                            Found in web/iconv-lite.js - About 35 mins to fix

                              Function writeDouble has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              function writeDouble (buf, value, offset, littleEndian, noAssert) {
                              Severity: Minor
                              Found in web/iconv-lite.js - About 35 mins to fix

                                Function writeFloat has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function writeFloat (buf, value, offset, littleEndian, noAssert) {
                                Severity: Minor
                                Found in web/buffer.js - About 35 mins to fix

                                  Function arrayIndexOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
                                  Severity: Minor
                                  Found in web/iconv-lite.js - About 35 mins to fix

                                    Function arrayIndexOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
                                    Severity: Minor
                                    Found in web/buffer.js - About 35 mins to fix

                                      Function setCol has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function setCol(info, prop, index, defVal, stateArray) {
                                      Severity: Minor
                                      Found in web/txt-to-sql.js - About 35 mins to fix

                                        Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        exports.read = function (buffer, offset, isLE, mLen, nBytes) {
                                        Severity: Minor
                                        Found in web/buffer.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language