Showing 6 of 12 total issues
Function _mouseDrag
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDrag: function(event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
Method build_server_tree
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def build_server_tree(tree, options= {})
result = ''
tree = Array.wrap tree
opts = {
# node and base node 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
Method build_server_tree
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_server_tree(tree, options= {})
result = ''
tree = Array.wrap tree
opts = {
# node and base node params
Function toArray
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
toArray: function(o) {
o = o || {};
var sDepth = o.startDepthCount || 0;
var ret = [];
Method rebuild
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rebuild
id = params[:id].to_i
parent_id = params[:parent_id].to_i
prev_id = params[:prev_id].to_i
next_id = params[:next_id].to_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
Method copy_helper_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def copy_helper_files
if param_name == 'tree'
puts "Copy of tree render helper file"
copy_file "../helpers/render_tree_helper.rb", "app/helpers/render_tree_helper.rb"
elsif param_name == 'sortable'
- 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"