codenautas/txt-to-sql

View on GitHub

Showing 200 of 405 total issues

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/buffer.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 web/txt-to-sql.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/buffer.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 web/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 web/txt-to-sql.js - About 45 mins to fix

            Function write has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
            Severity: Minor
            Found in web/buffer.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/buffer.js - About 45 mins to fix

                Function write has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
                Severity: Minor
                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/buffer.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/buffer.js - About 45 mins to fix

                      Function ymdHms has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      bestGlobals.datetime.ymdHms = function ymdHms(y, m, d, hh, mm, ss) {
                      Severity: Minor
                      Found in web/best-globals.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

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

                          Avoid deeply nested control flow statements.
                          Open

                                                  if(window[camelName]){
                                                      /* jshint -W093 */ 
                                                      return window.require.definedModules[name] = window[camelName];
                                                      /* jshint +W093 */ 
                                                  }else{
                          Severity: Major
                          Found in web/require-bro.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/buffer.js - About 45 mins to fix

                              Function checkInt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              function checkInt (buf, value, offset, ext, max, min) {
                              Severity: Minor
                              Found in web/iconv-lite.js - About 45 mins to fix

                                Function checkIEEE754 has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function checkIEEE754 (buf, value, offset, ext, max, min) {
                                Severity: Minor
                                Found in web/iconv-lite.js - About 45 mins to fix

                                  Function checkInt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  function checkInt (buf, value, offset, ext, max, min) {
                                  Severity: Minor
                                  Found in web/buffer.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(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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language