eliace/ergo-js

View on GitHub

Showing 167 of 296 total issues

File widget-data.js has 277 lines of code (exceeds 250 allowed). Consider refactoring.
Open




/**
 * @lends Ergo.core.Widget.prototype
Severity: Minor
Found in js/core/widget-data.js - About 2 hrs to fix

    Function mergeOptions has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        E.mergeOptions = function(o, sources, rules) {
    
            sources = Array.isArray(sources) ? sources : [sources];
    
            rules = rules || E.rules;
    Severity: Major
    Found in js/core/core-def.js - About 2 hrs to fix

      Function _rebind has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          _rebind: function(update, diff, initial) {
      
              var o = this.options;
              var self = this;
      
      
      Severity: Minor
      Found in js/core/widget-data.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 select has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          select: function(item) {
              var _el = this.el;//this.el.filter('.'+item.options.col);
              if( item.options.col ) {
                  var elements = this.el.childNodes;
                  if(elements.length == 0) {
      Severity: Minor
      Found in js/layouts/column.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 render has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render: function(target, cascade, beforeItem) {
      
      //        console.log('render');
      
      //    var el = this.el;
      Severity: Major
      Found in js/core/widget-render.js - About 2 hrs to fix

        Function _val has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _val: function(v) {
        //        if('_cached' in this) return this._cached;
        //        var v = undefined;
        
                if(arguments.length == 0) {
        Severity: Major
        Found in js/core/data.js - About 2 hrs to fix

          Function set has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              set: function(i, newValue) {
                  if(arguments.length == 1) {
                      newValue = i;
          
                      var oldValue = this.get();
          Severity: Minor
          Found in js/core/data.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 prop has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              prop: function(i, v, defaultValue) {
          
                  if(arguments.length == 1 || arguments.length == 3) {
          
                      if( this.options.get && (i in this.options.get) ) {
          Severity: Minor
          Found in js/core/widget.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 _postConstruct has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              _postConstruct: function(o) {
          //        this._super(o);
                  Ergo.core.Widget.superclass._postConstruct.call(this, o);
          
          
          
          Severity: Minor
          Found in js/core/widget.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 _bindEvents has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _bindEvents: function(targetProperty) {
          
                  var o = this.options;
          
                  var target = targetProperty ? this[targetProperty] : this;
          Severity: Major
          Found in js/core/events.js - About 2 hrs to fix

            `` has 21 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Ergo.defineClass('Ergo.core.DataSource', /** @lends Ergo.core.DataSource.prototype */{
            
                extends: 'Ergo.core.Object',
            
                mixins: ['observable'],
            Severity: Minor
            Found in js/core/data.js - About 2 hrs to fix

              Function fixDisorder has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  E.fixDisorder = function(kv_a, callback) {
              
                      // разница между индексами и позициями
                      var indexDeltas = [];
              
              
              Severity: Major
              Found in js/core/core-utils.js - About 2 hrs to fix

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

                    _rerender: function(cascade, diff) {
                
                        var w = this;
                        var o = this.options;
                
                
                Severity: Minor
                Found in js/core/widget-render.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 routeMatch has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                Open

                    routeMatch: function(path, route) {
                
                      var out = {};
                
                      var path_a = path.split('/');
                Severity: Minor
                Found in js/includes/router.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 prop has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                Open

                  prop: function(i, v, defaultValue) {
                
                    if(arguments.length == 1 || arguments.length == 3) {
                
                      if( this.options.get && (i in this.options.get) ) {
                Severity: Minor
                Found in js/core/object.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 _construct has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _construct: function(o) {
                
                        var _w = this;
                
                        this.navigator = {
                Severity: Major
                Found in js/includes/list-navigator.js - About 2 hrs to fix

                  Function _construct has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _construct: function(o) {
                          this._super(o);
                  
                  
                          this._scopes = {};
                  Severity: Minor
                  Found in js/core/context.js - About 1 hr to fix

                    Function set has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                set: function(key) {
                    
                                    if(key == undefined) return null;
                    
                                    var o = this._widget.options.selection || {};
                    Severity: Minor
                    Found in js/includes/selectable.js - About 1 hr to fix

                      Function join has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                          join: function(scope_name, params, widget) {
                      
                              var ctx = this;
                      
                              var parent = null;
                      Severity: Minor
                      Found in js/core/context.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 _preConstruct has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                          _preConstruct: function(o) {
                              Ergo.core.Widget.superclass._preConstruct.call(this, o);
                      //        this._super(o);
                      
                      
                      
                      Severity: Minor
                      Found in js/core/widget.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

                      Severity
                      Category
                      Status
                      Source
                      Language