Showing 12 of 51 total issues
File red-black-tree.js
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @module lib/red-black-tree
* @license MIT Copyright 2015 Daniel Imms (http://www.growingwiththeweb.com)
*/
'use strict';
- Create a ticketCreate a ticket
File splay-tree.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @module lib/splay-tree
* @license MIT Copyright 2014 Daniel Imms (http://www.growingwiththeweb.com)
*/
'use strict';
- Create a ticketCreate a ticket
Function deleteFixup
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RedBlackTree.prototype.deleteFixup = function (node) {
while (node !== this.root && node.color === 'black') {
var w;
if (node === node.parent.getLeft()) {
w = node.parent.getRight();
- Create a ticketCreate a ticket
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
'use strict';
grunt.config.init({
pkg: grunt.file.readJSON('package.json')
- Create a ticketCreate a ticket
Function insertFixup
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RedBlackTree.prototype.insertFixup = function (node) {
while (node.parent && node.parent.parent && node.parent.color === 'red') {
var uncle;
if (node.parent === node.parent.parent.getLeft()) {
uncle = node.parent.parent.getRight();
- Create a ticketCreate a ticket
Function remove
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RedBlackTree.prototype.remove = function (key) {
var node = this.search(key);
if (!node) {
return false;
}
- Create a ticketCreate a ticket
Function add
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BinarySearchTree.prototype.add = function (key) {
var newNode = new BinaryTreeNode(key);
if (!this.root) {
this.nodeCount++;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (node === node.parent.getLeft()) {
node = node.parent;
this.rotateRight(node);
}
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return false;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return containsInternal(tree, key, node.right);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return undefined;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return removeInternal2(tree, node);
- Create a ticketCreate a ticket