Showing 700 of 700 total issues
Function CHILD
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
"CHILD": function( type, what, _argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
Function Sizzle
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Sizzle( selector, context, results, seed ) {
var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
Function treeInit
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeInit: function (ctx) {
var $tdFirst,
$ul,
tree = ctx.tree,
$table = tree.widget.element;
Function widget
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.widget = function( name, base, prototype ) {
var existingConstructor, constructor, basePrototype;
// ProxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
Function widget
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.widget = $.widget || function( name, base, prototype ) {
var existingConstructor, constructor, basePrototype;
// ProxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
Function setViewport
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.ui.fancytree._FancytreeClass.prototype.setViewport = function (opts) {
if (typeof opts === "boolean") {
this.debug("setViewport( " + opts + ")");
return this.setViewport({ enabled: opts });
}
Function send
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function( headers, complete ) {
var i,
xhr = options.xhr();
xhr.open(
Function widget
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.widget = function( name, base, prototype ) {
var existingConstructor, constructor, basePrototype;
// ProxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
File taxonomy-browser-itis.js
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Fancytree Taxonomy Browser
*
* Copyright (c) 2015, Martin Wendt (https://wwWendt.de)
*
Similar blocks of code found in 2 locations. Consider refactoring. Open
nodeSetActive: function (ctx, flag, callOpts) {
var res,
local = this._local;
flag = flag !== false;
- Read upRead up
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 96.
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
nodeSetFocus: function (ctx, flag) {
var res,
local = this._local;
flag = flag !== false;
- Read upRead up
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 96.
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
Function nodeSetActive
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
nodeSetActive: function (ctx, flag, callOpts) {
// Handle user click / [space] / [enter], according to clickFolderMode.
callOpts = callOpts || {};
var subCtx,
node = ctx.node,
Function _setDndStatus
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setDndStatus: function (
sourceNode,
targetNode,
helper,
hitMode,
Function treeInit
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeInit: function (ctx) {
var tree = ctx.tree,
treeOpts = ctx.options,
opts = treeOpts.ariagrid;
Function editStart
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.ui.fancytree._FancytreeNodeClass.prototype.editStart = function () {
var $input,
node = this,
tree = this.tree,
local = tree.ext.edit,
File jquery.fancytree.edit.js
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jquery.fancytree.edit.js
*
* Make node titles editable.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
Similar blocks of code found in 2 locations. Consider refactoring. Open
getPrepared: function getPrepared(target) {
if (target.length > 999) return fuzzysort.prepare(target); // don't cache huge targets
var targetPrepared = preparedCache.get(target);
if (targetPrepared !== undefined) return targetPrepared;
- Read upRead up
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 93.
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
getPreparedSearch: function getPreparedSearch(search) {
if (search.length > 999) return fuzzysort.prepareSearch(search); // don't cache huge searches
var searchPrepared = preparedSearchCache.get(search);
if (searchPrepared !== undefined) return searchPrepared;
- Read upRead up
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 93.
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
Function drag
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
drag: function (event, ui) {
var ctx,
isHelper,
logObject,
// 'draggable' was renamed to 'ui-draggable' since jQueryUI 1.10
Function matcherFromGroupMatchers
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,