syntheticore/eakwell

View on GitHub

Showing 6 of 8 total issues

File eakwell.js has 532 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

var _ = module.exports = {

  // Empty placeholder function
Severity: Major
Found in eakwell.js - About 1 day to fix

    exports has 54 functions (exceeds 20 allowed). Consider refactoring.
    Open

    var _ = module.exports = {
    
      // Empty placeholder function
      noop: function() {},
    
    
    Severity: Major
    Found in eakwell.js - About 7 hrs to fix

      Function eventHandling has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        eventHandling: function(obj) {
          _.does(obj, {
            listeners: [],
      
            // Register a handler to be called every time an event happens
      Severity: Major
      Found in eakwell.js - About 2 hrs to fix

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

          each: function(items, cb) {
            if(Array.isArray(items)) {
              for(var i = 0; i < items.length; i++) {
                var cancel = cb(items[i], i);
                if(cancel) return cancel;
        Severity: Minor
        Found in eakwell.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 eventHandling has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

          eventHandling: function(obj) {
            _.does(obj, {
              listeners: [],
        
              // Register a handler to be called every time an event happens
        Severity: Minor
        Found in eakwell.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 ajax has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          ajax: function(options) {
            options = _.merge({
              verb: 'GET',
              url: '',
              responseType: 'json',
        Severity: Minor
        Found in eakwell.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language