Function loadServerBundles
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
var loadServerBundles = Profile("Load server bundles", function () {
var infos = [];
serverJson.load.forEach(function (fileInfo) {
var code = fs.readFileSync(path.resolve(serverDir, fileInfo.path));
File boot.js
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
var Fiber = require("fibers");
var fs = require("fs");
var path = require("path");
var Future = require("fibers/future");
var sourcemap_support = require('source-map-support');
Function runMain
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var runMain = Profile("Run main()", function () {
// find and run main()
// XXX hack. we should know the package that contains main.
var mains = [];
var globalMain;
Function maybeWaitForDebuggerToAttach
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function maybeWaitForDebuggerToAttach() {
if (meteorDebugFuture) {
const { pause } = require("./debug");
const pauseThresholdMs = 50;
const pollIntervalMs = 500;
- 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 getAsset
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getAsset = function (assetPath, encoding, callback) {
var promiseResolver, promise;
if (! callback) {
promise = new Promise((resolve, reject) => {
promiseResolver = function (error, result) {
Function runMain
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var runMain = Profile("Run main()", function () {
// find and run main()
// XXX hack. we should know the package that contains main.
var mains = [];
var globalMain;
- 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 startCheckForLiveParent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var startCheckForLiveParent = function (parentPid) {
if (parentPid) {
if (! bootUtils.validPid(parentPid)) {
console.error("METEOR_PARENT_PID must be a valid process ID.");
process.exit(1);
- 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"