codenautas/txt-to-sql

View on GitHub

Showing 405 of 405 total issues

Function slowToString has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function slowToString (encoding, start, end) {
  var loweredCase = false

  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  // property of a typed array.
Severity: Minor
Found in web/iconv-lite.js - About 1 hr to fix

    Function fixLines has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    txtToSql.fixLines = function fixLines(info, lines) {
        var errors=[];
        var numColumns = info.columnsInfo.length;
        var ln=0;
        var linesJoined=0;
    Severity: Minor
    Found in web/txt-to-sql.js - About 1 hr to fix

      Function slowToString has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function slowToString (encoding, start, end) {
        var loweredCase = false
      
        // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
        // property of a typed array.
      Severity: Minor
      Found in web/buffer.js - About 1 hr to fix

        Function fixLines has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        txtToSql.fixLines = function fixLines(info, lines) {
            var errors=[];
            var numColumns = info.columnsInfo.length;
            var ln=0;
            var linesJoined=0;
        Severity: Minor
        Found in lib/txt-to-sql.js - About 1 hr to fix

          Function toHtmlDoc has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          HtmlBase.prototype.toHtmlDoc=function toHtmlDoc(opts,recurseOpts){
              opts = opts||{};
              var html = jsToHtml.html;
              var target=this;
              if(!opts.incomplete){
          Severity: Minor
          Found in web/js-to-html.js - About 1 hr to fix

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function setCol(info, prop, index, defVal, stateArray) {
                if(haveColumnInfo(info, prop, index)) {
                    stateArray[prop] = true;
                    return info.opts.columns[index][prop];
                }
            Severity: Major
            Found in lib/txt-to-sql.js and 1 other location - About 1 hr to fix
            web/txt-to-sql.js on lines 545..552

            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 70.

            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

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            function setCol(info, prop, index, defVal, stateArray) {
                if(haveColumnInfo(info, prop, index)) {
                    stateArray[prop] = true;
                    return info.opts.columns[index][prop];
                }
            Severity: Major
            Found in web/txt-to-sql.js and 1 other location - About 1 hr to fix
            lib/txt-to-sql.js on lines 545..552

            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 70.

            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

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

            exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
              var e, m, c
              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 write has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
                var e, m, c
                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

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

                bestGlobals.coalesce.throwErrorIfUndefined=function throwErrorIfUndefined(message){
                    if(this === bestGlobals.coalesce){
                        return new bestGlobals.coalesce.throwErrorIfUndefined(message);
                    }else{
                        this.message=message;
                Severity: Major
                Found in web/best-globals.js and 1 other location - About 1 hr to fix
                web/best-globals.js on lines 50..56

                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 68.

                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

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                function haveColumnInfo(info, prop, index) {
                    return (info.opts.columns && info.opts.columns.length && info.opts.columns[index].hasOwnProperty(prop) ? true : false);
                }
                Severity: Major
                Found in web/txt-to-sql.js and 1 other location - About 1 hr to fix
                lib/txt-to-sql.js on lines 542..544

                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 68.

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

                bestGlobals.coalesce.throwError=function throwError(message){
                    if(this === bestGlobals.coalesce){
                        return new bestGlobals.coalesce.throwError(message);
                    }else{
                        this.message=message;
                Severity: Major
                Found in web/best-globals.js and 1 other location - About 1 hr to fix
                web/best-globals.js on lines 58..64

                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 68.

                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

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                function haveColumnInfo(info, prop, index) {
                    return (info.opts.columns && info.opts.columns.length && info.opts.columns[index].hasOwnProperty(prop) ? true : false);
                }
                Severity: Major
                Found in lib/txt-to-sql.js and 1 other location - About 1 hr to fix
                web/txt-to-sql.js on lines 542..544

                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 68.

                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

                Function bidirectionalIndexOf has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
                  // Empty buffer means no match
                  if (buffer.length === 0) return -1
                
                  // Normalize byteOffset
                Severity: Minor
                Found in web/iconv-lite.js - About 1 hr to fix

                  Function bidirectionalIndexOf has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
                    // Empty buffer means no match
                    if (buffer.length === 0) return -1
                  
                    // Normalize byteOffset
                  Severity: Minor
                  Found in web/buffer.js - About 1 hr to fix

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

                    InternalDecoderCesu8.prototype.write = function(buf) {
                        var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, 
                            res = '';
                        for (var i = 0; i < buf.length; i++) {
                            var curByte = buf[i];
                    Severity: Minor
                    Found in web/iconv-lite.js - About 1 hr to fix

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                      function separateWithDelimiter(info) {
                          return info.headers.split(info.opts.separator).map(function(name, index){
                              return {
                                  name:getDelimitedField(info, name),
                                  columnLength:0,
                      Severity: Major
                      Found in web/txt-to-sql.js and 1 other location - About 1 hr to fix
                      lib/txt-to-sql.js on lines 390..397

                      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 66.

                      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

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                      function separateWithDelimiter(info) {
                          return info.headers.split(info.opts.separator).map(function(name, index){
                              return {
                                  name:getDelimitedField(info, name),
                                  columnLength:0,
                      Severity: Major
                      Found in lib/txt-to-sql.js and 1 other location - About 1 hr to fix
                      web/txt-to-sql.js on lines 390..397

                      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 66.

                      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

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

                      Utf7Decoder.prototype.write = function(buf) {
                          var res = "", lastI = 0,
                              inBase64 = this.inBase64,
                              base64Accum = this.base64Accum;
                      
                      
                      Severity: Minor
                      Found in web/iconv-lite.js - About 1 hr to fix

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

                        Utf7IMAPDecoder.prototype.write = function(buf) {
                            var res = "", lastI = 0,
                                inBase64 = this.inBase64,
                                base64Accum = this.base64Accum;
                        
                        
                        Severity: Minor
                        Found in web/iconv-lite.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language