Showing 1,798 of 3,223 total issues
Function labelled
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
blockstmt("switch", function () {
var t = nexttoken,
g = false;
funct["(breakage)"] += 1;
advance("(");
Function dsv
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.dsv = function(delimiter, mimeType) {
var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
function dsv(url, row, callback) {
if (arguments.length < 3) callback = row, row = null;
var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
Function calculateInterval
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function calculateInterval() {
// NEED TO REWRITE ALL OF THIS
var _first = getDateFractions(data[0].startdate),
_last = getDateFractions(data[data.length - 1].enddate);
Function validateElms
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
validateElms : function(f, e) {
var nl, i, n, s = this.settings, st = true, va = Validator, v;
nl = this.tags(f, e);
for (i=0; i<nl.length; i++) {
- 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 buildDates
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildDates() {
_dates = [];
VMM.fireEvent(global, config.events.messege, "Building Dates");
updateSize();
Function defaultPrefilter
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/*jshint validthis:true */
var prop, index, length,
value, dataShow, toggle,
tween, hooks, oldfire,
File charmap.js
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* charmap.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
Function addValidElements
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addValidElements(valid_elements) {
var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
Function getRange
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getRange() {
var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail;
// If selection is outside the current document just return an empty range
element = ieRange.item ? ieRange.item(0) : ieRange.parentElement();
Function addValidElements
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addValidElements(valid_elements) {
var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
Function d3_geo_clipCircle
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geo_clipCircle(radius) {
var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);
function visible(λ, φ) {
return Math.cos(λ) * Math.cos(φ) > cr;
Function bindNativeEvents
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.Editor.prototype.bindNativeEvents = function() {
// 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset
var self = this, i, settings = self.settings, dom = self.dom, nativeToDispatcherMap;
nativeToDispatcherMap = {
Function _updateStyle
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
_updateStyle: function () {
var stroke = this._stroke,
fill = this._fill,
options = this.options,
container = this._container;
- 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 htmlParser
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function htmlParser( html, handler ) {
var index, chars, match, stack = [], last = html;
stack.last = function() { return stack[ stack.length - 1 ]; };
while ( html ) {
Function d3_geo_clip
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
return function(rotate, listener) {
var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
var clip = {
point: point,
Function normalizeEndPoint
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeEndPoint(start) {
var container, offset, walker, dom = self.dom, body = dom.getRoot(), node, nonEmptyElementsMap, nodeName;
function hasBrBeforeAfter(node, left) {
var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
Function setupEvents
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.Editor.prototype.setupEvents = function() {
var self = this, settings = self.settings;
// Add events to the editor
each([
Function callbacks
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
callbacks = (function () {
// for string, boolean, number and null
function useStrictEquality( b, a ) {
/*jshint eqeqeq:false */
Function buildData
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
buildData: function(d) {
var data_obj = VMM.Timeline.DataObj.data_template_obj,
is_valid = false;
VMM.fireEvent(global, VMM.Timeline.Config.events.messege, "Parsing Google Doc Data");
- 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 init
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
init : function(ed) {
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');
tinyMCEPopup.resizeToInnerSize();
this.fillClassList('class_list');
- 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"