codenautas/txt-to-sql

View on GitHub

Showing 405 of 405 total issues

Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

exports.read = function (buffer, offset, isLE, mLen, nBytes) {
Severity: Minor
Found in web/buffer.js - About 35 mins to fix

    Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    exports.read = function (buffer, offset, isLE, mLen, nBytes) {
    Severity: Minor
    Found in web/iconv-lite.js - About 35 mins to fix

      Function compare has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
      Severity: Minor
      Found in web/iconv-lite.js - About 35 mins to fix

        Function bidirectionalIndexOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
        Severity: Minor
        Found in web/iconv-lite.js - About 35 mins to fix

          Function moduleName has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                      var moduleName=name.replace(/^(\.\/)?(.*\/)*([^./]+)(\.js)?$/, function(match, fromThisPath, path, moduleName, extJs){
          Severity: Minor
          Found in web/require-bro.js - About 35 mins to fix

            Function writeDouble has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function writeDouble (buf, value, offset, littleEndian, noAssert) {
            Severity: Minor
            Found in web/buffer.js - About 35 mins to fix

              Function isValidTime has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              bestGlobals.Datetime.isValidTime = function isValidTime(h, m, s, ms, micros) {
              Severity: Minor
              Found in web/best-globals.js - About 35 mins to fix

                Function bidirectionalIndexOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
                Severity: Minor
                Found in web/buffer.js - About 35 mins to fix

                  Function compare has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
                  Severity: Minor
                  Found in web/buffer.js - About 35 mins to fix

                    Function setCol has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function setCol(info, prop, index, defVal, stateArray) {
                    Severity: Minor
                    Found in lib/txt-to-sql.js - About 35 mins to fix

                      Function codenautasModuleDefinition has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      (function codenautasModuleDefinition(root, name, factory) {
                          /* global define */
                          /* istanbul ignore next */
                          if(typeof root.globalModuleName !== 'string'){
                              root.globalModuleName = name;
                      Severity: Minor
                      Found in web/best-globals.js - About 35 mins 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 codenautasModuleDefinition has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      (function codenautasModuleDefinition(root, name, factory) {
                          /* global define */
                          /* istanbul ignore next */
                          if(typeof root.globalModuleName !== 'string'){
                              root.globalModuleName = name;
                      Severity: Minor
                      Found in web/js-to-html.js - About 35 mins 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

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

                      function alterTableAddPK(quotedTableName, pkName, pkArray) {
                          return 'alter table '+quotedTableName+' add constraint '+pkName+' add primary key ('+pkArray.join(',')+')';
                      }
                      Severity: Minor
                      Found in lib/txt-to-sql.js and 1 other location - About 35 mins to fix
                      web/txt-to-sql.js on lines 128..130

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

                      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 alterTableAddPK(quotedTableName, pkName, pkArray) {
                          return 'alter table '+quotedTableName+' add constraint '+pkName+' add primary key ('+pkArray.join(',')+')';
                      }
                      Severity: Minor
                      Found in web/txt-to-sql.js and 1 other location - About 35 mins to fix
                      lib/txt-to-sql.js on lines 128..130

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

                      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

                      Avoid too many return statements within this function.
                      Open

                              return 0;
                      Severity: Major
                      Found in web/best-globals.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return fromArrayLike(obj.data)
                        Severity: Major
                        Found in web/buffer.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                            return 0
                          Severity: Major
                          Found in web/buffer.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
                            Severity: Major
                            Found in web/buffer.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                if (y < x) return 1
                              Severity: Major
                              Found in web/buffer.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
                                Severity: Major
                                Found in web/buffer.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language