Showing 836 of 1,675 total issues
Function $design
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $design(node, maxsize, acum) {
var sval = node.getData(s, prop);
var notsval = maxsize
|| (node.getData(nots, prop));
Function updateJSON
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateJSON: function(json, onComplete) {
if(this.busy) return;
this.busy = true;
var delegate = this.delegate;
Function setEndpoint
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.setEndpoint = function(ep) {
var _e = function(t, p) {
var rm = _jsPlumb.getRenderMode();
if (jsPlumb.Endpoints[rm][t]) return new jsPlumb.Endpoints[rm][t](p);
Function getPath
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPath : function(segment) {
return ({
"Straight":function(segment) {
var d = segment.params;
return "m" + _conv(d.x1) + "," + _conv(d.y1) + " l" + _conv(d.x2) + "," + _conv(d.y2) + " e";
Function on_drag
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
fn.on_drag = function(event, ui) {
//break if dragstop has been fired
if (this.$player === null) {
return false;
}
Function getClassNames
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
getClassNames: function(date){
var cls = [],
year = this.viewDate.getUTCFullYear(),
month = this.viewDate.getUTCMonth(),
currentDate = this.date.valueOf(),
Function multisort
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function multisort(table) { /*jshint loopfunc:true */
var dir = 0, tc = table.config,
sortList = tc.sortList, l = sortList.length, bl = table.tBodies.length,
sortTime, i, k, c, colMax, cache, lc, s, order, orgOrderCol;
if (tc.serverSideSorting || !tc.cache[0]) { // empty table - fixes #206
Method update_install
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def update_install
#No authorize required
begin
expire_fragment('about_page')
Method update
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def update
authorize! :edit_organizations, Organization
@organization = Organization.find(params[:id])
if @organization.update_attributes(params[:organization])
Method show_project_history
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show_project_history
#No authorize required as authorizations are manage in each called function...
@counter = params['counter']
checked_node_ids = params['checked_node_ids']
action_id = params['action_id']
Method add_filter_on_project_version
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_filter_on_project_version
#No authorize required
selected_filter_version = params[:filter_selected]
#"Display leaves projects only",1], ["Display all versions",2], ["Display root version only",3], ["Most recent version",4]
Function select_or_unselect_all
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function select_or_unselect_all(clicked_elt){
var mp_id = $(clicked_elt).data("mp_id");
var rows_or_cols = $(clicked_elt).data("rows_or_cols");
var at_least_one_selected = false;
var number_of_elt = 0;
- 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 bind
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
bind : function() {
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')(\\s*(\\{[^}]*\\})|\\s|$)', 'i');
var e = document.getElementsByTagName('input');
for(var i=0; i<e.length; i+=1) {
var m;
- 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 setMeasures
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
function setMeasures(data, config, ctx, height, width, ylabels, reverseLegend, reverseAxis, drawAxis, drawLegendOnData) {
Method update_link_between_modules
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def update_link_between_modules(project, module_project, last_position_x=nil)
authorize! :alter_estimation_plan, project
return if @initialization_module.nil?
initialization_mod_proj = project.module_projects.find_by_pemodule_id(@initialization_module.id)
- 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 set_technology_size_type_abacus
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def set_technology_size_type_abacus
authorize! :edit_organizations, Organization
@organization = Organization.find(params[:organization])
@technologies = @organization.organization_technologies
- 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 edit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def edit
authorize! :manage_estimation_widgets, @project
@views_widget = ViewsWidget.find(params[:id])
@view_id = @views_widget.view_id
- 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 find_use_project
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def find_use_project
@project = Project.find(params[:project_id])
authorize! :show_project, @project
@related_projects = Array.new
- 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 results
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def results
#No authorize required since everyone can search
if params[:search].class == Array
classes = params[:search][:classes].map { |i| String::keep_clean_space(i).camelcase.constantize }
else
- 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 create
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create
@project = Project.find(params[:project_id])
authorize! :alter_project_pbs_products, @project
@pbs_project_element = PbsProjectElement.new(params[:pbs_project_element])
- 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"