codenautas/txt-to-sql

View on GitHub

Showing 200 of 405 total issues

Function 1 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
'use strict'

exports.byteLength = byteLength
exports.toByteArray = toByteArray
Severity: Minor
Found in web/buffer.js - About 3 hrs 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 write has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

DBCSEncoder.prototype.write = function(str) {
    var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),
        leadSurrogate = this.leadSurrogate,
        seqObj = this.seqObj, nextChar = -1,
        i = 0, j = 0;
Severity: Major
Found in web/iconv-lite.js - About 3 hrs to fix

    Function determinePrimaryKey has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    function determinePrimaryKey(info) {
        if(info.opts.includePrimaryKey !== false) {
            var warnings = [];
            var columnsInKey = [];
            var haveCustomKeys = info.columnsInfo.filter(function(col,colIndex) {
    Severity: Minor
    Found in web/txt-to-sql.js - About 3 hrs 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 determinePrimaryKey has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    function determinePrimaryKey(info) {
        if(info.opts.includePrimaryKey !== false) {
            var warnings = [];
            var columnsInKey = [];
            var haveCustomKeys = info.columnsInfo.filter(function(col,colIndex) {
    Severity: Minor
    Found in lib/txt-to-sql.js - About 3 hrs 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 5 has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"safer-buffer":25}],5:[function(require,module,exports){
    "use strict";
    
    // Description of supported double byte encodings and aliases.
    // Tables are not require()-d until they are needed to speed up library load.
    Severity: Major
    Found in web/iconv-lite.js - About 3 hrs to fix

      `` has 27 functions (exceeds 20 allowed). Consider refactoring.
      Open

      require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
      'use strict'
      
      exports.byteLength = byteLength
      exports.toByteArray = toByteArray
      Severity: Minor
      Found in web/iconv-lite.js - About 3 hrs to fix

        Function 2 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],2:[function(require,module,exports){
        exports.read = function (buffer, offset, isLE, mLen, nBytes) {
          var e, m
          var eLen = (nBytes * 8) - mLen - 1
          var eMax = (1 << eLen) - 1
        Severity: Major
        Found in web/buffer.js - About 2 hrs to fix

          Function 22 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],22:[function(require,module,exports){
          exports.read = function (buffer, offset, isLE, mLen, nBytes) {
            var e, m
            var eLen = (nBytes * 8) - mLen - 1
            var eMax = (1 << eLen) - 1
          Severity: Major
          Found in web/iconv-lite.js - About 2 hrs to fix

            Function TimeInterval has 73 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            bestGlobals.TimeInterval = function TimeInterval(timePack){
                /* istanbul ignore next */
                if(typeof timePack === 'number'){
                    timePack={ms:timePack};
                    console.log('|-----------------------------|');
            Severity: Major
            Found in web/best-globals.js - About 2 hrs to fix

              Function 24 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              },{}],24:[function(require,module,exports){
              /* eslint-disable node/no-deprecated-api */
              var buffer = require('buffer')
              var Buffer = buffer.Buffer
              
              
              Severity: Minor
              Found in web/iconv-lite.js - About 2 hrs 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 25 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"buffer":3}],25:[function(require,module,exports){
              (function (process){
              /* eslint-disable node/no-deprecated-api */
              
              'use strict'
              Severity: Major
              Found in web/iconv-lite.js - About 2 hrs to fix

                Function utf8Slice has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function utf8Slice (buf, start, end) {
                  end = Math.min(buf.length, end)
                  var res = []
                
                  var i = start
                Severity: Major
                Found in web/buffer.js - About 2 hrs to fix

                  Function utf8Slice has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function utf8Slice (buf, start, end) {
                    end = Math.min(buf.length, end)
                    var res = []
                  
                    var i = start
                  Severity: Major
                  Found in web/iconv-lite.js - About 2 hrs to fix

                    Function determinePrimaryKey has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function determinePrimaryKey(info) {
                        if(info.opts.includePrimaryKey !== false) {
                            var warnings = [];
                            var columnsInKey = [];
                            var haveCustomKeys = info.columnsInfo.filter(function(col,colIndex) {
                    Severity: Major
                    Found in web/txt-to-sql.js - About 2 hrs to fix

                      Function determinePrimaryKey has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function determinePrimaryKey(info) {
                          if(info.opts.includePrimaryKey !== false) {
                              var warnings = [];
                              var columnsInKey = [];
                              var haveCustomKeys = info.columnsInfo.filter(function(col,colIndex) {
                      Severity: Major
                      Found in lib/txt-to-sql.js - About 2 hrs to fix

                        Function utf8ToBytes has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function utf8ToBytes (string, units) {
                          units = units || Infinity
                          var codePoint
                          var length = string.length
                          var leadSurrogate = null
                        Severity: Major
                        Found in web/iconv-lite.js - About 2 hrs to fix

                          Function utf8ToBytes has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function utf8ToBytes (string, units) {
                            units = units || Infinity
                            var codePoint
                            var length = string.length
                            var leadSurrogate = null
                          Severity: Major
                          Found in web/buffer.js - About 2 hrs to fix

                            Function 8 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                            Open

                            },{"safer-buffer":25,"string_decoder":26}],8:[function(require,module,exports){
                            "use strict";
                            var Buffer = require("safer-buffer").Buffer;
                            
                            // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
                            Severity: Minor
                            Found in web/iconv-lite.js - About 2 hrs 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 17 has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{}],17:[function(require,module,exports){
                            module.exports=[
                            ["a140","",62],
                            ["a180","",32],
                            ["a240","",62],
                            Severity: Major
                            Found in web/iconv-lite.js - About 2 hrs to fix

                              Function write has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              Buffer.prototype.write = function write (string, offset, length, encoding) {
                                // Buffer#write(string)
                                if (offset === undefined) {
                                  encoding = 'utf8'
                                  length = this.length
                              Severity: Major
                              Found in web/iconv-lite.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language