Showing 2,021 of 3,362 total issues
File livedata_connection.js
has 1134 lines of code (exceeds 250 allowed). Consider refactoring. Open
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';
File logic.js
has 1105 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var has = Npm.require('lodash.has');
Logic._MiniSat = MiniSat; // Expose for testing and poking around
// import the private testers from types.js
File accounts_server.js
has 1072 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import crypto from 'crypto';
import { Meteor } from 'meteor/meteor'
import {
AccountsCommon,
EXPIRE_TOKENS_INTERVAL_MS,
File package-source.js
has 1066 lines of code (exceeds 250 allowed). Consider refactoring. Open
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');
File mongo_driver.js
has 1043 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
File main.js
has 996 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var showRequireProfile = ('METEOR_PROFILE_REQUIRE' in process.env);
if (showRequireProfile) {
require('../tool-env/profile-require.js').start();
}
File commands-packages-query.js
has 986 lines of code (exceeds 250 allowed). Consider refactoring. Open
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');
Function converter
has 491 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Showdown.converter = function(converter_options) {
//
// Globals:
//
File isopack.js
has 983 lines of code (exceeds 250 allowed). Consider refactoring. Open
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');
File biginteger.js
has 944 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/// METEOR WRAPPER
export default BigInteger = (function () {
/// BEGIN jsbn.js
File underscore.js
has 937 lines of code (exceeds 250 allowed). Consider refactoring. Open
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.
Function launchMongo
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
Open
var launchMongo = function(options) {
var onExit = options.onExit || function() {};
var noOplog = false;
var mongod_path = files.pathJoin(
- 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
File webapp_server.js
has 915 lines of code (exceeds 250 allowed). Consider refactoring. Open
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';
Function runWebAppServer
has 437 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function runWebAppServer() {
var shuttingDown = false;
var syncQueue = new Meteor._SynchronousQueue();
var getItemPathname = function(itemUrl) {
File common.js
has 861 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import LocalCollection from './local_collection.js';
export const hasOwn = Object.prototype.hasOwnProperty;
// Each element selector contains:
File backbone.js
has 856 lines of code (exceeds 250 allowed). Consider refactoring. Open
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:
File history.js
has 848 lines of code (exceeds 250 allowed). Consider refactoring. Open
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/>
File console.js
has 827 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
File meteor-npm.js
has 775 lines of code (exceeds 250 allowed). Consider refactoring. Open
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.
File solver.js
has 772 lines of code (exceeds 250 allowed). Consider refactoring. Open
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');