codenautas/txt-to-sql

View on GitHub

Showing 405 of 405 total issues

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

    "form": {
        "tags": {
            "button": {"description": "Associates the control with a form element","value": "ID*"},
            "fieldset": {"description": "Associates the control with a form element","value": "ID*"},
            "input": {"description": "Associates the control with a form element","value": "ID*"},
Severity: Major
Found in web/js-to-html.js and 2 other locations - About 6 hrs to fix
web/js-to-html.js on lines 693..706
web/js-to-html.js on lines 1219..1232

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

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 23 has 149 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],23:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
Severity: Major
Found in web/iconv-lite.js - About 5 hrs to fix

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

    function determineSeparator(info){
        if(! info.opts.separator) {
            var separatorCandidates = separators.split('');
            separatorCandidates.push(/\s+/);
            separatorCandidates = separatorCandidates.filter(function(separator){
    Severity: Major
    Found in lib/txt-to-sql.js and 1 other location - About 5 hrs to fix
    web/txt-to-sql.js on lines 340..353

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

    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 determineSeparator(info){
        if(! info.opts.separator) {
            var separatorCandidates = separators.split('');
            separatorCandidates.push(/\s+/);
            separatorCandidates = separatorCandidates.filter(function(separator){
    Severity: Major
    Found in web/txt-to-sql.js and 1 other location - About 5 hrs to fix
    lib/txt-to-sql.js on lines 340..353

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

    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

    txtToSql.makeError=function makeError(dictionaryVar, params) {
        var err=JSON.parse(JSON.stringify(dictionaryVar));
        if(0===params.length) { return err; }
        var numParams = err.match(/\d/g);
        if(numParams) {
    Severity: Major
    Found in web/txt-to-sql.js and 1 other location - About 5 hrs to fix
    lib/txt-to-sql.js on lines 887..897

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

    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

    txtToSql.makeError=function makeError(dictionaryVar, params) {
        var err=JSON.parse(JSON.stringify(dictionaryVar));
        if(0===params.length) { return err; }
        var numParams = err.match(/\d/g);
        if(numParams) {
    Severity: Major
    Found in lib/txt-to-sql.js and 1 other location - About 5 hrs to fix
    web/txt-to-sql.js on lines 887..897

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

    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 10 has 136 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],10:[function(require,module,exports){
    "use strict";
    
    // Manually added data to be used by sbcs codec in addition to generated one.
    
    
    Severity: Major
    Found in web/iconv-lite.js - About 5 hrs to fix

      Function 7 has 131 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"./dbcs-codec":4,"./dbcs-data":5,"./internal":7,"./sbcs-codec":8,"./sbcs-data":10,"./sbcs-data-generated":9,"./utf16":19,"./utf7":20}],7:[function(require,module,exports){
      "use strict";
      var Buffer = require("safer-buffer").Buffer;
      
      // Export Node.js internal encodings.
      Severity: Major
      Found in web/iconv-lite.js - About 5 hrs to fix

        Function 18 has 125 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],18:[function(require,module,exports){
        module.exports=[
        ["0","\u0000",128],
        ["a1","。",62],
        ["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],
        Severity: Major
        Found in web/iconv-lite.js - About 5 hrs to fix

          Function 11 has 122 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],11:[function(require,module,exports){
          module.exports=[
          ["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
          ["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
          ["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],
          Severity: Major
          Found in web/iconv-lite.js - About 4 hrs to fix

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

            function createAdaptedRows(info, rows) {
                return rows.map(function(row, rowIndex) {
                    return info.columnsInfo.map(function(column, columnIndex) {
                        var adaptedValue = column.typeInfo.adapt(row[columnIndex]);
                        //var adaptedValue = column.typeInfo.parse(column.typeInfo.adapt(row[columnIndex]));
            Severity: Major
            Found in lib/txt-to-sql.js and 1 other location - About 4 hrs to fix
            web/txt-to-sql.js on lines 691..705

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

            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 createAdaptedRows(info, rows) {
                return rows.map(function(row, rowIndex) {
                    return info.columnsInfo.map(function(column, columnIndex) {
                        var adaptedValue = column.typeInfo.adapt(row[columnIndex]);
                        //var adaptedValue = column.typeInfo.parse(column.typeInfo.adapt(row[columnIndex]));
            Severity: Major
            Found in web/txt-to-sql.js and 1 other location - About 4 hrs to fix
            lib/txt-to-sql.js on lines 691..705

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

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

                "height": {
                    "tags": {
                        "canvas": {"description": "Vertical dimension","value": "Valid non-negative integer"},
                        "embed": {"description": "Vertical dimension","value": "Valid non-negative integer"},
                        "iframe": {"description": "Vertical dimension","value": "Valid non-negative integer"},
            Severity: Major
            Found in web/js-to-html.js and 2 other locations - About 4 hrs to fix
            web/js-to-html.js on lines 1285..1296
            web/js-to-html.js on lines 1346..1357

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

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

                "width": {
                    "tags": {
                        "canvas": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
                        "embed": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
                        "iframe": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
            Severity: Major
            Found in web/js-to-html.js and 2 other locations - About 4 hrs to fix
            web/js-to-html.js on lines 796..807
            web/js-to-html.js on lines 1285..1296

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

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

                "title": {
                    "tags": {
                        "HTML elements": {"description": "Advisory information for the element","value": "Text"},
                        "abbr": {"description": "Full term or expansion of abbreviation","value": "Text"},
                        "dfn": {"description": "Full term or expansion of abbreviation","value": "Text"},
            Severity: Major
            Found in web/js-to-html.js and 2 other locations - About 4 hrs to fix
            web/js-to-html.js on lines 796..807
            web/js-to-html.js on lines 1346..1357

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

            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 1 has 117 lines of code (exceeds 25 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: Major
            Found in web/buffer.js - About 4 hrs to fix

              Function 1 has 117 lines of code (exceeds 25 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: Major
              Found in web/iconv-lite.js - About 4 hrs to fix

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

                function getDelimitedField(info, field) {
                    var last = field.length-1;
                    var start=field[0]===info.delimiter?1:0,
                        end=(last>start && field[last]===info.delimiter) ? last:last+1;
                    return field.substring(start, end).replace(new RegExp(info.delimiter+info.delimiter,"g"),info.delimiter);
                Severity: Major
                Found in lib/txt-to-sql.js and 1 other location - About 4 hrs to fix
                web/txt-to-sql.js on lines 369..374

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

                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 getDelimitedField(info, field) {
                    var last = field.length-1;
                    var start=field[0]===info.delimiter?1:0,
                        end=(last>start && field[last]===info.delimiter) ? last:last+1;
                    return field.substring(start, end).replace(new RegExp(info.delimiter+info.delimiter,"g"),info.delimiter);
                Severity: Major
                Found in web/txt-to-sql.js and 1 other location - About 4 hrs to fix
                lib/txt-to-sql.js on lines 369..374

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

                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 generatePrepareResult(info) {
                    var columns = info.columnsInfo.map(function(columnInfo) {
                        var col = changing({type:columnInfo.typeInfo.typeName}, columnInfo);
                        delete col.typeInfo;
                        delete col.columnLength;
                Severity: Major
                Found in web/txt-to-sql.js and 1 other location - About 4 hrs to fix
                lib/txt-to-sql.js on lines 789..802

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

                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

                Severity
                Category
                Status
                Source
                Language