Showing 15 of 15 total issues
`` has 37 functions (exceeds 20 allowed). Consider refactoring. Open
Ext.define("Netzke.Base", {
extend: 'Ext.Mixin',
mixinConfig: {
before: {
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", {
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);
- Read upRead up
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
Class ClientClassConfig
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class ClientClassConfig
attr_accessor :base_class, :properties, :translated_properties, :dir, :requires_as_string
def initialize(klass, called_from)
@klass = klass
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) {
- Read upRead up
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
Method netzke_deep_replace
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def netzke_deep_replace(&block)
self.dup.tap do |h|
h.each_pair do |k,v|
if v.is_a?(Hash)
res = yield(v)
- Read upRead up
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
Method detect_and_normalize_component
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def detect_and_normalize_component(item)
item = {component: item} if item.is_a?(Symbol) && respond_to?(:"#{item}_component")
return item unless item.is_a?(Hash)
return nil if item[:excluded]
- Read upRead up
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 camelize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
if (!String.prototype.camelize) String.prototype.camelize = function(lowFirstLetter)
{
var str=this; //.toLowerCase();
var str_path=str.split('/');
for(var i=0;i<str_path.length;i++)
- Read upRead up
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?
- Read upRead up
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
Method invoke_endpoint
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def invoke_endpoint(endpoint, params, configs = [])
self.client = Netzke::Core::EndpointResponse.new
if has_endpoint?(endpoint)
client.netzke_set_result(send("#{endpoint}_endpoint", *params))
- Read upRead up
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]);
}
Method detect_and_normalize_action
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def detect_and_normalize_action(item)
item = {action: item} if item.is_a?(Symbol) && actions[item]
if action_name = action_name_if_action(item)
action_config = actions[action_name]
- Read upRead up
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
Method netzke_jsonify
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def netzke_jsonify
self.inject({}) do |h,(k,v)|
new_key = if k.is_a?(Netzke::Core::JsonLiteral)
k
elsif k.is_a?(String)
- Read upRead up
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
Method netzke_deep_replace
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def netzke_deep_replace(&block)
self.map do |el|
res = yield(el)
if res == el
el.respond_to?(:netzke_deep_replace) ? el.netzke_deep_replace(&block) : el
- Read upRead up
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
Method method_missing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(name, *params)
if name.to_s =~ /(.+)=$/
self[$1.to_sym] = params.first
else
self[name] = self.class.new if self[name].nil?
- Read upRead up
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"