joannangx/visionaria_app

View on GitHub

Showing 72 of 568 total issues

Function writeFileSync has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

module.exports.sync = function writeFileSync (filename, data, options) {
  if (!options) options = {}
  var tmpfile = getTmpname(filename)

  try {
Severity: Minor
Found in node_modules/write-file-atomic/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 chain has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function chain (things, cb) {
  var res = []
  ;(function LOOP (i, len) {
    if (i >= len) return cb(null,res)
    if (Array.isArray(things[i]))
Severity: Minor
Found in node_modules/slide/lib/chain.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 requestAsEventEmitter has 47 lines of code (exceeds 25 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 1 hr to fix

    Function ReadStream has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

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

          MurmurHash3.prototype.hash = function(key) {
              var h1, k1, i, top, len;
      
              len = key.length;
              this.len += len;
      Severity: Minor
      Found in node_modules/imurmurhash/imurmurhash.js - About 1 hr to fix

        Method check_params has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            def check_params(lang)
                if lang == 'esp'
                    self.info = "Haga clic en el texto para editar." if self.info.blank?
                    self.motivations = "Haga clic en el texto para editar." if self.motivations.blank?
                    self.priorities = "Haga clic en el texto para editar." if self.priorities.blank?
        Severity: Minor
        Found in app/models/profile.rb - 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 v1 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function v1(options, buf, offset) {
          var i = buf && offset || 0;
          var b = buf || [];
        
          options = options || {};
        Severity: Minor
        Found in node_modules/uuid/uuid.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 sync has a Cognitive Complexity of 14 (exceeds 5 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

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

        function asStream(opts) {
            const input = new PassThrough();
            const output = new PassThrough();
            const proxy = duplexer3(input, output);
        
        
        Severity: Minor
        Found in node_modules/got/index.js - About 1 hr to fix

          Function get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          module.exports.get = function (obj, path) {
              if (!isObj(obj) || typeof path !== 'string') {
                  return obj;
              }
          
          
          Severity: Minor
          Found in node_modules/dot-prop/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

          Method determine_op_and_update has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

              def determine_op_and_update(op)
                  if op == 'add'
                      self.update({:amount => self.amount + 1})
                      if self.amount >= 1 and self.amount < 3 and self.level != 1
                          self.update({:level => 1})
          Severity: Minor
          Found in app/models/point.rb - 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 v1 has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function v1(options, buf, offset) {
            var i = buf && offset || 0;
            var b = buf || [];
          
            options = options || {};
          Severity: Minor
          Found in node_modules/uuid/uuid.js - About 1 hr to fix

            Function asPromise has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function asPromise(opts) {
                return new Promise((resolve, reject) => {
                    const ee = requestAsEventEmitter(opts);
            
                    ee.on('request', req => {
            Severity: Minor
            Found in node_modules/got/index.js - About 1 hr to fix

              Function exports has 37 lines of code (exceeds 25 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

                Function get has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    const get = opts => {
                        const fn = opts.protocol === 'https:' ? https : http;
                
                        const req = fn.request(opts, res => {
                            const statusCode = res.statusCode;
                Severity: Minor
                Found in node_modules/got/index.js - About 1 hr to fix

                  Function DuplexWrapper has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function DuplexWrapper(options, writable, readable) {
                    if (typeof readable === "undefined") {
                      readable = writable;
                      writable = options;
                      options = null;
                  Severity: Minor
                  Found in node_modules/duplexer3/index.js - About 1 hr to fix

                    Function patchLutimes has 36 lines of code (exceeds 25 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 1 hr to fix

                      Function homedir has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function homedir() {
                          var env = process.env;
                          var home = env.HOME;
                          var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
                      
                      
                      Severity: Minor
                      Found in node_modules/os-homedir/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 mkdirP has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function sM has 34 lines of code (exceeds 25 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 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language