eliace/ergo-js

View on GitHub

Showing 167 of 296 total issues

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

    _bindDOM: function() {

        var o = this.options;

        if(o.layout) {
Severity: Minor
Found in js/core/widget-render.js - About 1 hr to fix

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

        add: function(value, index) {
    
            var values = this.get();
    
            var isLast = false;
    Severity: Minor
    Found in js/core/data.js - About 1 hr to fix

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

          _construct: function(o) {
              Ergo.core.Widget.superclass._construct.call(this, o);
      
      
              var self = this;
      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

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

          _state_off: function(s, data) {
      
              var self = this;
              var states = this._states;//this._widget.options.states;
      
      Severity: Minor
      Found in js/core/states.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 set has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          set: function(v) {
      
              // если значение устанавливается именно для нас
              if(arguments.length == 1) {
      
      
      Severity: Minor
      Found in js/data/object.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 fetch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          fetch: function(q) {
      
              this._fetched = undefined;
      
              var parse = this.options.parser || this._parse;
      Severity: Minor
      Found in js/data/collection.js - About 1 hr to fix

        Function _layoutChanged has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _layoutChanged: function() {
                this._super();
        
        
                if(this.before._rendered) {
        Severity: Minor
        Found in js/widgets/boxes/item-box.js - About 1 hr to fix

          Function state has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              state: function(name, value) {
          
                  if(arguments.length == 1) {
                      return this._current[name];
                  }
          Severity: Minor
          Found in js/core/states.js - About 1 hr to fix

            Function fire has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                fire: function(type, _event, baseEvent) {
            
                    // "ленивая" генерация базового события
                    // var _event = {
                    //     base: baseEvent,
            Severity: Minor
            Found in js/core/events.js - About 1 hr to fix

              Function _state_off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _state_off: function(s, data) {
              
                      var self = this;
                      var states = this._states;//this._widget.options.states;
              
              Severity: Minor
              Found in js/core/states.js - About 1 hr to fix

                Function _dataChanged has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _dataChanged: function(lazy, cascade, no_dynamic) {
                
                //        this.events.fire('refresh');//, e);
                
                        // если отключено каскадирование, то обновление не производим
                Severity: Minor
                Found in js/core/widget-data.js - About 1 hr to fix

                  Function show has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          show: function() {
                  
                              var effect = false;
                  
                  //            if( !this.children.isEmpty() || this.el.text() ) {  // ?
                  Severity: Minor
                  Found in js/includes/effects.js - About 1 hr to fix

                    Function unset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                unset: function(key) {
                    
                                    var o = this._widget.options.selection || {};
                    
                                    // определяем метод поиска
                    Severity: Minor
                    Found in js/includes/selectable.js - About 1 hr to fix

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

                          off: function(arg, arg2) {
                      
                              var events = this.events;
                      
                              if(arguments.length == 0) {
                      Severity: Minor
                      Found in js/core/events.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 value has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          set value(val) {
                      
                      //        if(this._lock_value_change) return;
                      
                              var o = this.options;
                      Severity: Minor
                      Found in js/core/widget.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 routes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          routes: function(o) {
                      
                            var routes = {};
                      
                            var f = function(r, parent) {
                      Severity: Minor
                      Found in js/includes/router.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 placeholder has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          set placeholder(v) {
                            var tag = this.el.prop('tagName').toLowerCase();
                            if(tag == 'input' || tag == 'textarea') {
                              if(v != null) {
                                this.el.prop('placeholder', v);
                      Severity: Minor
                      Found in js/includes/placeholder.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 _postConstruct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                        _postConstruct: function(o) {
                      
                          if(this._includes) {
                      //      var mods = o.mods.join(' ').split(' ').uniq();
                            for(var i = 0; i < this._includes.length; i++) {
                      Severity: Minor
                      Found in js/core/object.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 value has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          get value() {
                              var val;
                              var o = this.options;
                      
                              if(this.data)
                      Severity: Minor
                      Found in js/core/widget.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 _construct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          _construct: function(o) {
                              this._super(o);
                      
                      
                              var w = this;
                      Severity: Minor
                      Found in js/widgets/basic/table.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

                      Severity
                      Category
                      Status
                      Source
                      Language