meteor/meteor

View on GitHub

Showing 2,021 of 3,362 total issues

File livedata_connection.js has 1134 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Meteor } from 'meteor/meteor';
import { DDPCommon } from 'meteor/ddp-common';
import { Tracker } from 'meteor/tracker';
import { EJSON } from 'meteor/ejson';
import { Random } from 'meteor/random';
Severity: Major
Found in packages/ddp-client/common/livedata_connection.js - About 2 days to fix

    File logic.js has 1105 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var has = Npm.require('lodash.has');
    
    Logic._MiniSat = MiniSat; // Expose for testing and poking around
    
    // import the private testers from types.js
    Severity: Major
    Found in packages/logic-solver/logic.js - About 2 days to fix

      File accounts_server.js has 1072 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import crypto from 'crypto';
      import { Meteor } from 'meteor/meteor'
      import {
        AccountsCommon,
        EXPIRE_TOKENS_INTERVAL_MS,
      Severity: Major
      Found in packages/accounts-base/accounts_server.js - About 2 days to fix

        File package-source.js has 1066 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var _ = require('underscore');
        var files = require('../fs/files');
        var utils = require('../utils/utils.js');
        var watch = require('../fs/watch');
        var buildmessage = require('../utils/buildmessage.js');
        Severity: Major
        Found in tools/isobuild/package-source.js - About 2 days to fix

          File mongo_driver.js has 1043 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import { normalizeProjection } from "./mongo_utils";
          
          /**
           * Provide a synchronous Collection API using fibers, backed by
           * MongoDB.  This is only for use on the server, and mostly identical
          Severity: Major
          Found in packages/mongo/mongo_driver.js - About 2 days to fix

            File main.js has 996 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var showRequireProfile = ('METEOR_PROFILE_REQUIRE' in process.env);
            if (showRequireProfile) {
              require('../tool-env/profile-require.js').start();
            }
            
            
            Severity: Major
            Found in tools/cli/main.js - About 2 days to fix

              File commands-packages-query.js has 986 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // These commands deal with aggregating local package data with the information
              // contained in the Meteor Package Server. They also deal with presenting this
              // to the user in various human or machine-readable ways.
              var _ = require('underscore');
              var buildmessage = require('../utils/buildmessage.js');
              Severity: Major
              Found in tools/cli/commands-packages-query.js - About 2 days to fix

                Function converter has 491 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Showdown.converter = function(converter_options) {
                
                //
                // Globals:
                //
                Severity: Major
                Found in packages/deprecated/markdown/showdown.js - About 2 days to fix

                  File isopack.js has 983 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  var compiler = require('./compiler.js');
                  var archinfo = require('../utils/archinfo');
                  var _ = require('underscore');
                  var linker = require('./linker.js');
                  var buildmessage = require('../utils/buildmessage.js');
                  Severity: Major
                  Found in tools/isobuild/isopack.js - About 2 days to fix

                    File biginteger.js has 944 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /// METEOR WRAPPER
                    export default BigInteger = (function () {
                    
                    
                    /// BEGIN jsbn.js
                    Severity: Major
                    Found in packages/deprecated/srp/biginteger.js - About 2 days to fix

                      File underscore.js has 937 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      //     Underscore.js 1.6.0
                      //     http://underscorejs.org
                      //     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
                      //     Underscore may be freely distributed under the MIT license.
                      
                      
                      Severity: Major
                      Found in packages/underscore/underscore.js - About 2 days to fix

                        Function launchMongo has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var launchMongo = function(options) {
                          var onExit = options.onExit || function() {};
                        
                          var noOplog = false;
                          var mongod_path = files.pathJoin(
                        Severity: Minor
                        Found in tools/runners/run-mongo.js - About 2 days 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

                        File webapp_server.js has 915 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import assert from 'assert';
                        import { readFileSync, chmodSync, chownSync } from 'fs';
                        import { createServer } from 'http';
                        import { userInfo } from 'os';
                        import { join as pathJoin, dirname as pathDirname } from 'path';
                        Severity: Major
                        Found in packages/webapp/webapp_server.js - About 2 days to fix

                          Function runWebAppServer has 437 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function runWebAppServer() {
                            var shuttingDown = false;
                            var syncQueue = new Meteor._SynchronousQueue();
                          
                            var getItemPathname = function(itemUrl) {
                          Severity: Major
                          Found in packages/webapp/webapp_server.js - About 2 days to fix

                            File common.js has 861 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import LocalCollection from './local_collection.js';
                            
                            export const hasOwn = Object.prototype.hasOwnProperty;
                            
                            // Each element selector contains:
                            Severity: Major
                            Found in packages/minimongo/common.js - About 2 days to fix

                              File backbone.js has 856 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              //     Backbone.js 0.9.2
                              
                              //     (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
                              //     Backbone may be freely distributed under the MIT license.
                              //     For all details and documentation:
                              Severity: Major
                              Found in packages/deprecated/backbone/backbone.js - About 2 days to fix

                                File history.js has 848 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * History.js Core
                                 * @author Benjamin Arthur Lupton <contact@balupton.com>
                                 * @copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
                                 * @license New BSD License <http://creativecommons.org/licenses/BSD/>
                                Severity: Major
                                Found in packages/deprecated/jquery-history/history.js - About 2 days to fix

                                  File console.js has 827 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  ///  This class provides a set of utility functions for printing to the terminal
                                  ///  in the Meteor tool.
                                  ///
                                  ///  When you intend for your messages to be read by humans, you should use the
                                  ///  following functions to print to the terminal. They will automatically line
                                  Severity: Major
                                  Found in tools/console/console.js - About 1 day to fix

                                    File meteor-npm.js has 775 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /// Implements the process of managing a package's .npm directory,
                                    /// in which we call `npm install` to install npm dependencies,
                                    /// and a variety of related commands. Notably, we use `npm shrinkwrap`
                                    /// to ensure we get consistent versions of npm sub-dependencies.
                                    
                                    
                                    Severity: Major
                                    Found in tools/isobuild/meteor-npm.js - About 1 day to fix

                                      File solver.js has 772 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      const has = Npm.require('lodash.has');
                                      const zip = Npm.require('lodash.zip');
                                      const memoize = Npm.require('lodash.memoize');
                                      const groupBy = Npm.require('lodash.groupby');
                                      
                                      
                                      Severity: Major
                                      Found in packages/constraint-solver/solver.js - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language