netzke/netzke-core

View on GitHub
javascripts/base.js

Summary

Maintainability
D
1 day
Test Coverage

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

Ext.define("Netzke.Base", {
  extend: 'Ext.Mixin',

  mixinConfig: {
    before: {
Severity: Minor
Found in javascripts/base.js - About 4 hrs to fix

    File base.js has 327 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Client-side code for [Netzke::Base](http://www.rubydoc.info/github/netzke/netzke-core/Netzke/Base)
     * @class Netzke.Base
     */
    Ext.define("Netzke.Base", {
    Severity: Minor
    Found in javascripts/base.js - About 3 hrs to fix

      Function netzkeProcessDeliveredComponent has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

        netzkeProcessDeliveredComponent: function(container, result, params){
          var config = result.config, instance, doNotInsert, currentInstance;
          config.netzkeParent = this;
      
          this.netzkeEvalJs(result.js);
      Severity: Minor
      Found in javascripts/base.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 netzkeBulkExecute has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

        netzkeBulkExecute : function(instructions){
          if (Ext.isArray(instructions)) {
            Ext.each(instructions, function(instruction){ this.netzkeBulkExecute(instruction)}, this);
          } else {
            for (var instr in instructions) {
      Severity: Minor
      Found in javascripts/base.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 netzkeProcessDirectResponse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

        netzkeProcessDirectResponse: function(response, event, callback, scope){
          var callbackParams,
              result; // endpoint response
      
          // no server exception?
      Severity: Minor
      Found in javascripts/base.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

      Avoid deeply nested control flow statements.
      Open

                if (Ext.isArray(cfg[key])) {
                  this.netzkeNormalizeConfigArray(cfg[key]);
                }
      Severity: Major
      Found in javascripts/base.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status