eliace/ergo-js

View on GitHub

Showing 167 of 296 total issues

Function _preConstruct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  _preConstruct: function (o) {

    // динамическое подключение расширений
    if('include' in o) {
//      this._includes = o.include.join(' ').split(' ').uniq();
Severity: Minor
Found in js/core/object.js - About 25 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 remove has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    remove: function(item) {

        var item_el = item.dom.outerEl;// (item._wrapper_el || item.dom.el);

Severity: Minor
Found in js/core/layout.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
Open

  _construct: 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 25 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 _destroy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  _destroy: function() {
    //

    if(this._includes) {
//      var mods = o.mods.join(' ').split(' ').uniq();
Severity: Minor
Found in js/core/object.js - About 25 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 text has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      text: function(v) {
            if(this.$content) {
                this.$content.prop('text', v == null ? '': v);
            }
            else {
Severity: Minor
Found in js/core/widget-props.js - About 25 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 rise has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    rise: function(name, e, baseEvent) {
        if(e == null) {
            e = {};
        }
        else if( e instanceof Ergo.core.Event || e.constructor == Object ) {
Severity: Minor
Found in js/core/widget.js - About 25 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 stream has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    stream: function(filter, sorter, pager, callback) {

        var c = this._widget; // возможно не лучшее решение, но практичное

        var filter = filter || c.options.filter;
Severity: Minor
Found in js/core/widget-list.js - About 25 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