eliace/ergo-js

View on GitHub

Showing 167 of 296 total issues

Function _destroy has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _destroy: function(root) {
        Ergo.core.Widget.superclass._destroy.call(this);

        var self = this;

Severity: Minor
Found in js/core/widget.js - About 1 hr to fix

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

      Function _initialize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _initialize: function(tag, widget, options, ns) {
      
          var dom = this;
      
          this._widget = widget;
      Severity: Minor
      Found in js/core/dom.js - About 1 hr to fix

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

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

            Function del has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                del: function(i) {
                    if(arguments.length == 1) {
                        this.entry(i).del();
                    }
                    else {
            Severity: Minor
            Found in js/core/data.js - About 1 hr to fix

              Function defineClass has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  E.defineClass = function(class_name, overrides, etype) {
              
                      var base_class;
              
                      // `extends` class property
              Severity: Minor
              Found in js/core/core-classes.js - About 1 hr to fix

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

                  Function unformatObj has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      E.unformatObj = function(ufmt, s) {
                  
                          var n=0;
                  
                          var tmpl = ufmt.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
                  Severity: Minor
                  Found in js/core/core-utils.js - About 1 hr to fix

                    Function deepMerge has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        E.deepMerge = function(o) {
                    
                            for(var j = 1; j < arguments.length; j++) {
                    
                                var srcObj = arguments[j];
                    Severity: Minor
                    Found in js/core/core-def.js - About 1 hr to fix

                      Function unset has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                          unset: function(from, data) {
                      
                              // Если состояние не установлено, то ничего не делаем
                              if(from && !(from in this._current)) {
                                  return false;//$.when({});
                      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 _initialize has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                          _initialize: function(src, id, o) {
                      
                      
                              /**
                               * Источник данных
                      Severity: Minor
                      Found in js/core/data.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 _postConstruct has 31 lines of code (exceeds 25 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 1 hr to fix

                        Function _postConstruct has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _postConstruct: function(o) {
                        
                        
                                if('events' in o){
                                    for(var i in o.events){
                        Severity: Minor
                        Found in js/core/events.js - About 1 hr to fix

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

                              unset: function(from, data) {
                          
                                  // Если состояние не установлено, то ничего не делаем
                                  if(from && !(from in this._current)) {
                                      return false;//$.when({});
                          Severity: Minor
                          Found in js/core/states.js - About 1 hr to fix

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

                              Function flush has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  flush: function() {
                              
                                      var oid = this.oid;
                              
                                      var composer = this.options.composer || this._compose;
                              Severity: Minor
                              Found in js/data/object.js - About 1 hr to fix

                                Function _state_on has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _state_on: 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 set has 29 lines of code (exceeds 25 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 1 hr to fix

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

                                        E.formatObj = function(format_str, obj) {
                                            if(obj === null || obj === undefined) return '';
                                    
                                            var m = format_str.match(/^{{([^}{]+?)}}$/);
                                    
                                    
                                    Severity: Minor
                                    Found in js/core/core-utils.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language