Showing 679 of 1,357 total issues
Function find
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
find: function( selector ) {
var self = this,
i, l;
if ( typeof selector !== "string" ) {
Function show
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
show: function( speed, easing, callback ) {
var elem, display;
if ( speed || speed === 0 ) {
return this.animate( genFx("show", 3), speed, easing, callback );
Method add_build
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_build(build)
begin
current_dir = Rails.root.join('lib', 'builder_plugins', 'sequential_build_logger').to_s
#Log file and html file in project path
project_build_sequence_log = "#{build.project.path}/build_sequence.log"
Method warning_chart
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def warning_chart
clean_data
CSV.foreach(@csv_file) do |row|
if row[0] == "Warning Type"
- 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 display_build_time
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def display_build_time
build_time_text = remove_leading_zero I18n.l(@build.time, :format => :verbose)
if @build.incomplete?
if @build.latest?
- 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 kill_all_builders
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def kill_all_builders
killed = []
@projects = Project.all
@projects.each do |project|
- 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 notify_of_build_outcome
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def notify_of_build_outcome(build, fixed = nil)
if @subscribers.empty?
CruiseControl::Log.debug("Jabber notifier: no subscribers registered")
else
status = if build.failed?
- 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 show
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
show: function( speed, easing, callback ) {
var elem, display;
if ( speed || speed === 0 ) {
return this.animate( genFx("show", 3), speed, easing, callback);
Function html
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
html: function( value ) {
if ( value === undefined ) {
return this[0] && this[0].nodeType === 1 ?
this[0].innerHTML.replace(rinlinejQuery, "") :
null;
Function addClass
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
addClass: function( value ) {
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this);
self.addClass( value.call(this, i, self.attr("class") || "") );
Function custom
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
custom: function( from, to, unit ) {
var self = this,
fx = jQuery.fx,
raf;
Function shake
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.shake = function(o) {
return this.queue(function() {
// Create element
Function type
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn[ type ] = function( size ) {
// Get window width or height
var elem = this[0];
if ( !elem ) {
return size == null ? null : this;
Function transfer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.transfer = function(o) {
return this.queue(function() {
var elem = $(this),
target = $(o.options.to),
endPosition = target.offset(),
Function drag
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
drag: function(draggable, event) {
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
Function refresh
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function() {
var isDisabled = this.element.is( ":disabled" );
if ( isDisabled !== this.options.disabled ) {
this._setOption( "disabled", isDisabled );
}
Function drag
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
drag: function(draggable, event) {
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
Function transfer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.transfer = function(o) {
return this.queue(function() {
var elem = $(this),
target = $(o.options.to),
endPosition = target.offset(),
Function shake
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.shake = function(o) {
return this.queue(function() {
// Create element
Function refresh
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function() {
var isDisabled = this.element.is( ":disabled" );
if ( isDisabled !== this.options.disabled ) {
this._setOption( "disabled", isDisabled );
}