codenautas/txt-to-sql

View on GitHub

Showing 200 of 405 total issues

Function toByteArray has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function toByteArray (b64) {
  var tmp
  var lens = getLens(b64)
  var validLen = lens[0]
  var placeHoldersLen = lens[1]
Severity: Minor
Found in web/buffer.js - About 1 hr to fix

    Function copy has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Buffer.prototype.copy = function copy (target, targetStart, start, end) {
      if (!start) start = 0
      if (!end && end !== 0) end = this.length
      if (targetStart >= target.length) targetStart = target.length
      if (!targetStart) targetStart = 0
    Severity: Minor
    Found in web/buffer.js - About 1 hr to fix

      Function verifyInputParams has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function verifyInputParams(info){
          info.opts = changing(txtToSql.defaultOpts, info.opts || {});
          txtToSql.detectBooleans = info.opts.detectBooleans;
          info.messages=txtToSql.dictionary[info.opts.lang];
          var errors=[];
      Severity: Minor
      Found in lib/txt-to-sql.js - About 1 hr to fix

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

        bestGlobals.registerJson4All = function registerJson4All(JSON4all){
            JSON4all.addType(Date, {
                specialTag: function specialTag(value){
                    if(value.isRealDate){
                        return 'date';
        Severity: Minor
        Found in web/best-globals.js - About 1 hr to fix

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

                  window.define = function define(){
                      var argPos=0;
                      var name;
                      var dependencies=['require'];
                      var factory;
          Severity: Minor
          Found in web/require-bro.js - About 1 hr to fix

            Function requireBro has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                window.require = function requireBro(name){
                    if(window.require.definedModules[name]){
                        return window.require.definedModules[name];
                    }else{
                        var moduleName=name.replace(/^(\.\/)?(.*\/)*([^./]+)(\.js)?$/, function(match, fromThisPath, path, moduleName, extJs){
            Severity: Minor
            Found in web/require-bro.js - About 1 hr to fix

              Function toHms has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.toHms = function toHms(omitSeconds, withDays, omitLeftCeros) {
                      var leftCero = omitLeftCeros?'':'0';
                      var tm = this.timeInterval.ms;
                      var prefix = (tm<0?'-':'');
                      var tdiff = [];
              Severity: Minor
              Found in web/best-globals.js - About 1 hr to fix

                Function getCodec has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                iconv.getCodec = function getCodec(encoding) {
                    if (!iconv.encodings)
                        iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
                    
                    // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
                Severity: Minor
                Found in web/iconv-lite.js - About 1 hr to fix

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

                  function browserifyOutDated(moduleName, relativeModuleFileName, exposedName, outputDir) {
                      var moduleDir = './node_modules/'+moduleName+'/';
                      var registry='./tools/versions.json';
                      var regJSON, modJSON;
                      var mustUpdate = false;
                  Severity: Minor
                  Found in tools/web.js - About 1 hr to fix

                    Function 21 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{"safer-buffer":25}],21:[function(require,module,exports){
                    "use strict";
                    
                    var BOMChar = '\uFEFF';
                    
                    
                    Severity: Minor
                    Found in web/iconv-lite.js - About 1 hr 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 fromByteArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function fromByteArray (uint8) {
                      var tmp
                      var len = uint8.length
                      var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
                      var parts = []
                    Severity: Minor
                    Found in web/buffer.js - About 1 hr to fix

                      Function fromByteArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function fromByteArray (uint8) {
                        var tmp
                        var len = uint8.length
                        var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
                        var parts = []
                      Severity: Minor
                      Found in web/iconv-lite.js - About 1 hr to fix

                        Function createInsertValues has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function createInsertValues(info, rows) {
                            var inserts = [];
                            var group = [];
                            rows.forEach(function(row, index){
                                var owedLength = 0;
                        Severity: Minor
                        Found in web/txt-to-sql.js - About 1 hr to fix

                          Function createInsertValues has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function createInsertValues(info, rows) {
                              var inserts = [];
                              var group = [];
                              rows.forEach(function(row, index){
                                  var owedLength = 0;
                          Severity: Minor
                          Found in lib/txt-to-sql.js - About 1 hr to fix

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

                            bestGlobals.compareForOrder = function compareForOrder(sortColumns){
                                var thisModule = this;
                                return function forOrderComparator(row1,row2){
                                    var column;
                                    var i=0;
                            Severity: Minor
                            Found in web/best-globals.js - About 1 hr to fix

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

                              exports.read = function (buffer, offset, isLE, mLen, nBytes) {
                                var e, m
                                var eLen = (nBytes * 8) - mLen - 1
                                var eMax = (1 << eLen) - 1
                                var eBias = eMax >> 1
                              Severity: Minor
                              Found in web/buffer.js - About 1 hr to fix

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

                                exports.read = function (buffer, offset, isLE, mLen, nBytes) {
                                  var e, m
                                  var eLen = (nBytes * 8) - mLen - 1
                                  var eMax = (1 << eLen) - 1
                                  var eBias = eMax >> 1
                                Severity: Minor
                                Found in web/iconv-lite.js - About 1 hr to fix

                                  Function ymdHmsMm has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  bestGlobals.datetime.ymdHmsMm = function ymdHmsMm(year, month, day, hour, minutes, seconds, ms, micros){
                                  Severity: Major
                                  Found in web/best-globals.js - About 1 hr to fix

                                    Function ymdHmsM has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    bestGlobals.datetime.ymdHmsM = function ymdHmsM(y, m, d, hh, mm, ss, ms) {
                                    Severity: Major
                                    Found in web/best-globals.js - About 50 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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language