mongoclient/mongoclient

View on GitHub

Showing 331 of 698 total issues

Function Plot has 1987 lines of code (exceeds 25 allowed). Consider refactoring.
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", ... }
Severity: Major
Found in client/plugins/flot/jquery.flot.js - About 1 wk to fix

    File jquery.flot.js has 2239 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* Javascript plotting library for jQuery, version 0.8.3.
    
    Copyright (c) 2007-2014 IOLA and Ole Laursen.
    Licensed under the MIT license.
    
    
    Severity: Major
    Found in client/plugins/flot/jquery.flot.js - About 6 days to fix

      Function Chosen has 721 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        this.Chosen = (function(_super) {
          __extends(Chosen, _super);
      
          function Chosen() {
            _ref = Chosen.__super__.constructor.apply(this, arguments);
      Severity: Major
      Found in client/plugins/chosen_fork/chosen.proto.js - About 3 days to fix

        File chosen.proto.js has 1260 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
        Chosen, a Select Box Enhancer for jQuery and Prototype
        by Patrick Filler for Harvest, http://getharvest.com
        
        Version 1.5.1
        Severity: Major
        Found in client/plugins/chosen_fork/chosen.proto.js - About 3 days to fix

          File chosen.jquery.js has 1227 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
          Chosen, a Select Box Enhancer for jQuery and Prototype
          by Patrick Filler for Harvest, http://getharvest.com
          
          Version 1.5.1
          Severity: Major
          Found in client/plugins/chosen_fork/chosen.jquery.js - About 3 days to fix

            File bootstrap-colorpicker.js has 1155 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*!
             * Bootstrap Colorpicker v2.4.0
             * https://itsjavi.com/bootstrap-colorpicker/
             *
             * Originally written by (c) 2012 Stefan Petre
            Severity: Major
            Found in client/plugins/colorpicker/js/bootstrap-colorpicker.js - About 2 days to fix

              Function init has 470 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function init(plot) {
              
                      var canvas = null,
                          target = null,
                          options = null,
              Severity: Major
              Found in client/plugins/flot/jquery.flot.pie.js - About 2 days to fix

                File querying.js has 708 lines of code (exceeds 250 allowed). Consider refactoring.
                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';
                Severity: Major
                Found in client/imports/ui/querying/querying.js - About 1 day to fix

                  File jquery.flot.pie.js has 525 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* Flot plugin for rendering pie charts.
                  
                  Copyright (c) 2007-2014 IOLA and Ole Laursen.
                  Licensed under the MIT license.
                  
                  
                  Severity: Major
                  Found in client/plugins/flot/jquery.flot.pie.js - About 1 day to fix

                    Function drawSeriesLines has 187 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function drawSeriesLines(series) {
                                function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
                                    var points = datapoints.points,
                                        ps = datapoints.pointsize,
                                        prevx = null, prevy = null;
                    Severity: Major
                    Found in client/plugins/flot/jquery.flot.js - About 7 hrs to fix

                      Function drawGrid has 186 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function drawGrid() {
                                  var i, axes, bw, bc;
                      
                                  ctx.save();
                                  ctx.translate(plotOffset.left, plotOffset.top);
                      Severity: Major
                      Found in client/plugins/flot/jquery.flot.js - About 7 hrs to fix

                        Function draw has 175 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function draw(plot, newCtx) {
                        
                                    if (!target) {
                                        return; // if no series were passed
                                    }
                        Severity: Major
                        Found in client/plugins/flot/jquery.flot.pie.js - About 7 hrs to fix

                          Function init has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function init(plot) {
                                  function onZoomClick(e, zoomOut) {
                                      var c = plot.offset();
                                      c.left = e.pageX - c.left;
                                      c.top = e.pageY - c.top;
                          Severity: Major
                          Found in client/plugins/flot/jquery.flot.navigate.js - About 6 hrs to fix

                            Function processData has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function processData() {
                                        var topSentry = Number.POSITIVE_INFINITY,
                                            bottomSentry = Number.NEGATIVE_INFINITY,
                                            fakeInfinity = Number.MAX_VALUE,
                                            i, j, k, m, length,
                            Severity: Major
                            Found in client/plugins/flot/jquery.flot.js - About 6 hrs to fix

                              Function getConnectionUrl has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                              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);
                              Severity: Minor
                              Found in server/imports/core/connection/index.js - About 6 hrs to fix

                              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

                                  function init(plot) {
                                      plot.hooks.processOptions.push(function (plot, options) {
                                          $.each(plot.getAxes(), function(axisName, axis) {
                              
                                              var opts = axis.options;
                              Severity: Major
                              Found in client/plugins/flot/jquery.flot.time.js - About 6 hrs to fix

                                Function Enums has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                                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',
                                Severity: Major
                                Found in client/imports/modules/enums/index.js - About 5 hrs to fix

                                  File roles.js has 402 lines of code (exceeds 250 allowed). Consider refactoring.
                                  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';
                                  Severity: Minor
                                  Found in client/imports/ui/user_management/roles.js - About 5 hrs to fix

                                    File index.js has 402 lines of code (exceeds 250 allowed). Consider refactoring.
                                    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';
                                    Severity: Minor
                                    Found in client/imports/ui/index_management/index.js - About 5 hrs to fix

                                      File index.js has 394 lines of code (exceeds 250 allowed). Consider refactoring.
                                      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';
                                      Severity: Minor
                                      Found in client/imports/ui/db_stats/index.js - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language