Showing 6,062 of 6,062 total issues
Function markText
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function markText(from, to, className) {
from = clipPos(from); to = clipPos(to);
var accum = [];
function add(line, from, to, className) {
var line = lines[line], mark = line.addMark(from, to, className);
- Create a ticketCreate a ticket
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
- Create a ticketCreate a ticket
Function setup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function() {
if ( rformElems.test( this.nodeName ) ) {
// IE doesn't fire change on a check/radio until blur; trigger it on click
// after a propertychange. Eat the blur-change in special.change.handle.
- Create a ticketCreate a ticket
Function _updateVirtualBoundaries
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateVirtualBoundaries: function(forceAspectRatio) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
o = this.options;
b = {
- Create a ticketCreate a ticket
Function refresh
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function() {
//See #8237 & #8828
var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
if ( isDisabled !== this.options.disabled ) {
- Create a ticketCreate a ticket
Function left
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- Create a ticketCreate a ticket
Function stop
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
stop: function( event ) {
var that = $(this).data("ui-resizable"),
o = that.options,
pr = that._proportionallyResizeElements,
ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- Create a ticketCreate a ticket
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getDimensions( elem ) {
var raw = elem[0];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
- Create a ticketCreate a ticket
Function top
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
- Create a ticketCreate a ticket
Function updatePosition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
updatePosition: function (x, y) {
if (x === undefined) {
if (this.mousex === undefined) {
return;
}
- Create a ticketCreate a ticket
Function _setupHeightStyle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setupHeightStyle: function( heightStyle ) {
var maxHeight,
parent = this.element.parent();
if ( heightStyle === "fill" ) {
- Create a ticketCreate a ticket
Function clean
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.clean = function( elems, context, fragment, scripts ) {
// Set context per 1.8 logic
context = context || document;
context = !context.nodeType && context[0] || context;
context = context.ownerDocument || context;
- Create a ticketCreate a ticket
Method new
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.new(nic)
logstr=""
if nic.is_a?(::Nic)
return nic
elsif o = @@interfaces[nic]
- Create a ticketCreate a ticket
Function __module0__
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
"use strict";
var __exports__;
var Handlebars = __dependency1__;
- Create a ticketCreate a ticket
Method registered_stylesheets
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def registered_stylesheets
@registered_stylesheets ||= begin
files = [
"vendor",
"application"
- Create a ticketCreate a ticket
Method option_default
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def option_default(options, item, scope = "")
h = options.clone
if h.nil?
h = [
- Create a ticketCreate a ticket
Method registered_javascripts
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def registered_javascripts
@registered_javascripts ||= begin
files = [
"vendor",
"application"
- Create a ticketCreate a ticket
Method expand_nodes_for_all
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def expand_nodes_for_all(items)
nodes = []
failures = []
items.each do |item|
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!this.containers[innermostIndex].containerCache.over) {
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
this.containers[innermostIndex].containerCache.over = 1;
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 56.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( jQuery.isFunction( html ) ) {
return this.each(function(i) {
jQuery(this).wrapAll( html.call(this, i) );
});
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 56.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76