Showing 331 of 698 total issues
Function Plot
has 1987 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Plot(placeholder, data_, options_, plugins) {
// data is on the form:
// [ series1, series2 ... ]
// where series is either just the data as [ [x1, y1], [x2, y2], ... ]
// or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
File jquery.flot.js
has 2239 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Javascript plotting library for jQuery, version 0.8.3.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Function Chosen
has 721 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Chosen = (function(_super) {
__extends(Chosen, _super);
function Chosen() {
_ref = Chosen.__super__.constructor.apply(this, arguments);
File chosen.proto.js
has 1260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.5.1
File chosen.jquery.js
has 1227 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.5.1
File bootstrap-colorpicker.js
has 1155 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Bootstrap Colorpicker v2.4.0
* https://itsjavi.com/bootstrap-colorpicker/
*
* Originally written by (c) 2012 Stefan Petre
Function init
has 470 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(plot) {
var canvas = null,
target = null,
options = null,
File querying.js
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Meteor } from 'meteor/meteor';
import { Enums, Notification, ExtendedJSON, UIComponents, SessionManager } from '/client/imports/modules';
import { Connection, QueryRender, QueryingOptions } from '/client/imports/ui';
import { Communicator } from '/client/imports/facades';
import { _ } from 'meteor/underscore';
File jquery.flot.pie.js
has 525 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Flot plugin for rendering pie charts.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Function drawSeriesLines
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSeriesLines(series) {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null, prevy = null;
Function drawGrid
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawGrid() {
var i, axes, bw, bc;
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
Function draw
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function draw(plot, newCtx) {
if (!target) {
return; // if no series were passed
}
Function init
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(plot) {
function onZoomClick(e, zoomOut) {
var c = plot.offset();
c.left = e.pageX - c.left;
c.top = e.pageY - c.top;
Function processData
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processData() {
var topSentry = Number.POSITIVE_INFINITY,
bottomSentry = Number.NEGATIVE_INFINITY,
fakeInfinity = Number.MAX_VALUE,
i, j, k, m, length,
Function getConnectionUrl
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
Open
getConnectionUrl(connection, username, password, addAuthSource, keepDB) {
if (connection.url) {
if (username || password) ConnectionHelper.changeUsernameAndPasswordFromConnectionUrl(connection, username, password);
if (!keepDB) ConnectionHelper.extractDBFromConnectionUrl(connection);
else ConnectionHelper.putCorrectDBToConnectionUrl(connection);
- 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 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(plot) {
plot.hooks.processOptions.push(function (plot, options) {
$.each(plot.getAxes(), function(axisName, axis) {
var opts = axis.options;
Function Enums
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Enums = function () {
this.LOCAL_STORAGE_KEYS = {
MONGO_BINARY_INFO: 'mongoclient-mongo-binary-220-warn',
SHELL_COMMAND_HISTORY: 'mongoclient-shell-history',
AGGREGATE_COMMAND_HISTORY: 'mongoclient-aggregate-history',
File roles.js
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Communicator, ReactivityProvider } from '/client/imports/facades';
import { Notification, ErrorHandler, SessionManager, UIComponents } from '/client/imports/modules';
import Helper from '/client/imports/helpers/helper';
import UsermanagementHelper from './helper';
import { _ } from 'meteor/underscore';
File index.js
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Communicator, ReactivityProvider } from '/client/imports/facades';
import { UIComponents, ExtendedJSON, ErrorHandler, Notification } from '/client/imports/modules';
import Helper from '/client/imports/helpers/helper';
import moment from 'moment';
import $ from 'jquery';
File index.js
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { SessionManager, ErrorHandler, UIComponents, Notification } from '/client/imports/modules';
import { Communicator, ReactivityProvider } from '/client/imports/facades';
import Helper from '/client/imports/helpers/helper';
import moment from 'moment';
import $ from 'jquery';