joannangx/visionaria_app

View on GitHub

Showing 72 of 568 total issues

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

module.exports = function (args, opts) {
    if (!opts) opts = {};
    
    var flags = { bools : {}, strings : {} };
    
Severity: Minor
Found in node_modules/minimist/index.js - About 1 day 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 patch has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
Open

function patch (fs) {
  // (re-)implement some things that are known busted or missing.

  // lchmod, broken prior to 0.6.2
  // back-port the fix here.
Severity: Minor
Found in node_modules/graceful-fs/polyfills.js - About 7 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 patch has 163 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function patch (fs) {
  // Everything that references the open() function needs to be in here
  polyfills(fs)
  fs.gracefulify = patch
  fs.FileReadStream = ReadStream;  // Legacy name.
Severity: Major
Found in node_modules/graceful-fs/graceful-fs.js - About 6 hrs to fix

    Function legacy has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

    function legacy (fs) {
      return {
        ReadStream: ReadStream,
        WriteStream: WriteStream
      }
    Severity: Minor
    Found in node_modules/graceful-fs/legacy-streams.js - About 5 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 normalizeArguments has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

    function normalizeArguments(url, opts) {
        if (typeof url !== 'string' && typeof url !== 'object') {
            throw new Error(`Parameter \`url\` must be a string or object, not ${typeof url}`);
        }
    
    
    Severity: Minor
    Found in node_modules/got/index.js - About 5 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 exports has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function (args, opts) {
        if (!opts) opts = {};
        
        var flags = { bools : {}, strings : {} };
        
    Severity: Major
    Found in node_modules/minimist/index.js - About 4 hrs to fix

      Function patch has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

      function patch (fs) {
        // Everything that references the open() function needs to be in here
        polyfills(fs)
        fs.gracefulify = patch
        fs.FileReadStream = ReadStream;  // Legacy name.
      Severity: Minor
      Found in node_modules/graceful-fs/graceful-fs.js - About 4 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

      Method show has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          def show
              @viewed_user = User.find(params[:id])
              @profile = @viewed_user.profile
              @owned = @profile == current_user.profile
              
      Severity: Minor
      Found in app/controllers/profiles_controller.rb - About 4 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 patchLutimes has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

      function patchLutimes (fs) {
        if (constants.hasOwnProperty("O_SYMLINK")) {
          fs.lutimes = function (path, at, mt, cb) {
            fs.open(path, constants.O_SYMLINK, function (er, fd) {
              if (er) {
      Severity: Minor
      Found in node_modules/graceful-fs/polyfills.js - About 4 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 translate has 91 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function translate(text, opts) {
          opts = opts || {};
      
          var e;
          [opts.from, opts.to].forEach(function (lang) {
      Severity: Major
      Found in node_modules/google-translate-api/index.js - About 3 hrs to fix

        Function legacy has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function legacy (fs) {
          return {
            ReadStream: ReadStream,
            WriteStream: WriteStream
          }
        Severity: Major
        Found in node_modules/graceful-fs/legacy-streams.js - About 3 hrs to fix

          Function patch has 84 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function patch (fs) {
            // (re-)implement some things that are known busted or missing.
          
            // lchmod, broken prior to 0.6.2
            // back-port the fix here.
          Severity: Major
          Found in node_modules/graceful-fs/polyfills.js - About 3 hrs to fix

            Function normalizeArguments has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function normalizeArguments(url, opts) {
                if (typeof url !== 'string' && typeof url !== 'object') {
                    throw new Error(`Parameter \`url\` must be a string or object, not ${typeof url}`);
                }
            
            
            Severity: Major
            Found in node_modules/got/index.js - About 2 hrs to fix

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

              module.exports = shouldUseNative() ? Object.assign : function (target, source) {
                  var from;
                  var to = toObject(target);
                  var symbols;
              
              
              Severity: Minor
              Found in node_modules/object-assign/index.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

              File index.js has 285 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              const EventEmitter = require('events').EventEmitter;
              const http = require('http');
              const https = require('https');
              const PassThrough = require('stream').PassThrough;
              Severity: Minor
              Found in node_modules/got/index.js - About 2 hrs to fix

                Function patchLchmod has a Cognitive Complexity of 19 (exceeds 5 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 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

                File parse.js has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                var parse = require('../');
                var test = require('tape');
                
                test('parse args', function (t) {
                    t.deepEqual(
                Severity: Minor
                Found in node_modules/minimist/test/parse.js - About 2 hrs to fix

                  Function asyncMap has a Cognitive Complexity of 18 (exceeds 5 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 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 sM has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function sM(a) {
                      var b;
                      if (null !== yr)
                          b = yr;
                      else {
                  Severity: Minor
                  Found in node_modules/google-translate-token/index.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 requestAsEventEmitter has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function requestAsEventEmitter(opts) {
                      opts = opts || {};
                  
                      const ee = new EventEmitter();
                      const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path);
                  Severity: Minor
                  Found in node_modules/got/index.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

                  Severity
                  Category
                  Status
                  Source
                  Language