Showing 836 of 1,675 total issues
Function color
has 565 lines of code (exceeds 25 allowed). Consider refactoring. Open
color : function(target, prop) {
this.required = true; // refuse empty values?
this.adjust = true; // adjust value to uniform notation?
File bootstrap-datepicker.js
has 1091 lines of code (exceeds 250 allowed). Consider refactoring. Open
// ################################# BOOTSTRAP DATE PICKER #################################
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
File jit-2.0.1-excanvas.js
has 1084 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Method display_inputs_with_activities
has a Cognitive Complexity of 113 (exceeds 5 allowed). Consider refactoring. Open
def display_inputs_with_activities(module_project, last_estimation_result=nil)
pbs_project_element = current_component
res = String.new
if module_project.compatible_with(current_component.work_element_type.alias)# || current_component
pemodule = Pemodule.find(module_project.pemodule.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
File projects_helper.rb
has 899 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ProjectsHelper
# This helper method will display Estimation Result according the estimation purpose (PBS and/or Activities)
def display_results
res = String.new
Method execute_duplication_SAVE
has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring. Open
def execute_duplication_SAVE(project_id, new_organization_id, user_id)
user = User.find(user_id)
#begin
- 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
File organizations_controller.rb
has 852 lines of code (exceeds 250 allowed). Consider refactoring. Open
class OrganizationsController < ApplicationController
load_resource
require 'rubygems'
require 'securerandom'
include ProjectsHelper
Function setMeasures
has 401 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setMeasures(data, config, ctx, height, width, ylabels, reverseLegend, reverseAxis, drawAxis, drawLegendOnData) {
if(config.canvasBackgroundColor != "none") ctx.canvas.style.background =config.canvasBackgroundColor;
var borderWidth = 0;
Function AnchorManager
has 397 lines of code (exceeds 25 allowed). Consider refactoring. Open
jsPlumb.AnchorManager = function(params) {
var _amEndpoints = {},
continuousAnchors = {},
continuousAnchorLocations = {},
userDefinedContinuousAnchorLocations = {},
File jscolor.js
has 821 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* jscolor, JavaScript Color Picker
*
* @version 1.4.3
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
Function Connection
has 380 lines of code (exceeds 25 allowed). Consider refactoring. Open
jsPlumb.Connection = function(params) {
var self = this, visible = true, _internalHover, _superClassHover,
_jsPlumb = params["_jsPlumb"],
jpcl = jsPlumb.CurrentLibrary,
_att = jpcl.getAttribute,
File projestimate_script.js
has 771 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ProjEstimate, Open Source project estimation web application
* Copyright (c) 2012-2013 Spirula (http://www.spirula.fr)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Method update
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
def update
set_page_title 'Edit estimation'
@project = Project.find(params[:id])
@organization = @project.organization
- 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 format
has 354 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo){
if (c.parsers && !c.$table.hasClass('hasFilters')){
var i, j, k, l, val, ff, x, xi, st, sel, str,
ft, ft2, $th, rg, s, t, dis, col,
fmt = ts.formatFloat,
Function ST
has 352 lines of code (exceeds 25 allowed). Consider refactoring. Open
$jit.ST= (function() {
// Define some private methods first...
// Nodes in path
var nodesInPath = [];
// Nodes to contract
Method update_records
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
def self.update_records(external, local, fields)
loc_defined_rs_id = RecordStatus.find_by_name('Defined').id
loc_custom_rs_id = RecordStatus.find_by_name('Custom').id
loc_local_rs_id = RecordStatus.find_by_name('Local').id
ext_defined_rs_id = ExternalMasterDatabase::ExternalRecordStatus.find_by_name('Defined').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 execute_duplication_SAVE_NOT_WORKING
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
def self.execute_duplication_SAVE_NOT_WORKING(project_id, parameters, create_from_template = nil)
#Project.transaction do
begin
old_prj = Project.find(project_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
Function doMouseMove
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
function doMouseMove(ctx, config, event) {
font = "<font face=" + config.annotateFontFamily + " size=" + config.annotateFontSize + "px style=\"font-style:" + config.annotateFontStyle + ";color:" + config.annotateFontColor + "\">";
var annotateDIV = document.getElementById('divCursor');
- 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 load_master_data!
has 320 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.load_master_data!
db=Home::connect_external_database
#begin
record_status = ExternalMasterDatabase::ExternalRecordStatus.all
record_status.each do |i|
Method included
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
def self.included(base)
base.class_eval do
#self relation on master data : Parent<->Child
- 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"