joannangx/visionaria_app

View on GitHub

Showing 72 of 568 total issues

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

function getStream(inputStream, opts) {
    if (!inputStream) {
        return Promise.reject(new Error('Expected a stream'));
    }

Severity: Minor
Found in node_modules/get-stream/index.js - About 1 hr to fix

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

    function patchLchmod (fs) {
      fs.lchmod = function (path, mode, callback) {
        fs.open( path
               , constants.O_WRONLY | constants.O_SYMLINK
               , mode
    Severity: Minor
    Found in node_modules/graceful-fs/polyfills.js - About 1 hr to fix

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

      function asyncMap () {
        var steps = Array.prototype.slice.call(arguments)
          , list = steps.shift() || []
          , cb_ = steps.pop()
        if (typeof cb_ !== "function") throw new Error(
      Severity: Minor
      Found in node_modules/slide/lib/async-map.js - About 1 hr to fix

        Function sync has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        mkdirP.sync = function sync (p, opts, made) {
            if (!opts || typeof opts !== 'object') {
                opts = { mode: opts };
            }
            
        Severity: Minor
        Found in node_modules/mkdirp/index.js - About 1 hr to fix

          Function handleThenable has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function handleThenable(promise, value) {
              var resolved;
          
              try {
                  if (promise === value) {
          Severity: Minor
          Found in node_modules/pinkie/index.js - About 1 hr to fix

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

            function shouldUseNative() {
                try {
                    if (!Object.assign) {
                        return false;
                    }
            Severity: Minor
            Found in node_modules/object-assign/index.js - About 1 hr to fix

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

              module.exports = function writeFile (filename, data, options, callback) {
                if (options instanceof Function) {
                  callback = options
                  options = null
                }
              Severity: Minor
              Found in node_modules/write-file-atomic/index.js - About 1 hr to fix

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

                  function WriteStream (path, options) {
                    if (!(this instanceof WriteStream)) return new WriteStream(path, options);
                
                    Stream.call(this);
                
                
                Severity: Minor
                Found in node_modules/graceful-fs/legacy-streams.js - About 1 hr to fix

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

                  module.exports = function (req, time) {
                      if (req.timeoutTimer) {
                          return req;
                      }
                  
                  
                  Severity: Minor
                  Found in node_modules/timed-out/index.js - About 1 hr to fix

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

                    module.exports = function (opts) {
                        opts = objectAssign({}, opts);
                    
                        var array = opts.array;
                        var encoding = opts.encoding;
                    Severity: Minor
                    Found in node_modules/get-stream/buffer-stream.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 all has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Promise.all = function (promises) {
                        if (!Array.isArray(promises)) {
                            throw new TypeError('You must pass an array to Promise.all().');
                        }
                    
                    
                    Severity: Minor
                    Found in node_modules/pinkie/index.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 all has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Promise.all = function (promises) {
                        if (!Array.isArray(promises)) {
                            throw new TypeError('You must pass an array to Promise.all().');
                        }
                    
                    
                    Severity: Minor
                    Found in node_modules/pinkie/index.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if (isWindows) {
                              path = process.env.TEMP ||
                                  process.env.TMP ||
                                  (process.env.SystemRoot || process.env.windir) + '\\temp';
                          } else {
                      Severity: Major
                      Found in node_modules/os-tmpdir/index.js - About 1 hr to fix

                        Function handleThenable has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function handleThenable(promise, value) {
                            var resolved;
                        
                            try {
                                if (promise === value) {
                        Severity: Minor
                        Found in node_modules/pinkie/index.js - About 55 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 memo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function memo (key, lookup, fallback) {
                          var fell = false
                          var falling = false
                          exports[key] = function (cb) {
                            var val = lookup()
                        Severity: Minor
                        Found in node_modules/osenv/osenv.js - About 55 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 v4 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function v4(options, buf, offset) {
                          // Deprecated - 'format' argument, as supported in v1.2
                          var i = buf && offset || 0;
                        
                          if (typeof(options) == 'string') {
                        Severity: Minor
                        Found in node_modules/uuid/uuid.js - About 45 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

                        Avoid deeply nested control flow statements.
                        Open

                                        if (/[A-Za-z]/.test(letters[j])
                                        && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
                                            setArg(letters[j], next);
                                            broken = true;
                                            break;
                        Severity: Major
                        Found in node_modules/minimist/index.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
                                          && !flags.bools[key]
                                          && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
                                              setArg(key, args[i+1]);
                                              i++;
                          Severity: Major
                          Found in node_modules/minimist/index.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            if (letters[j+1] && letters[j+1].match(/\W/)) {
                                                setArg(letters[j], arg.slice(j+2));
                                                broken = true;
                                                break;
                                            }
                            Severity: Major
                            Found in node_modules/minimist/index.js - About 45 mins to fix

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

                              function invokeCallback(subscriber) {
                                  var owner = subscriber.owner;
                                  var settled = owner._state;
                                  var value = owner._data;
                                  var callback = subscriber[settled];
                              Severity: Minor
                              Found in node_modules/pinkie/index.js - About 45 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

                              Severity
                              Category
                              Status
                              Source
                              Language