Showing 2,031 of 3,395 total issues
File sandbox.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Represents an install of the tool. Creating this creates a private
// sandbox with its own state, separate from the state of the current
// meteor install or checkout, from the user's homedir, and from the
// state of any other sandbox. It also creates an empty directory
// which will be, by default, the cwd for runs created inside the
Function write
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
write(builder, {
buildMode,
// falsy or 'symlink', documented on exports.bundle
includeNodeModules,
} = {}) {
Function doTestCommand
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function doTestCommand(options) {
// This "metadata" is accessed in a few places. Using a global
// variable here was more expedient than navigating the many layers
// of abstraction across the build process.
//
- 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 resolve
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public resolve(
id: string,
absParentPath: string,
_seenDirPaths?: Set<string>,
): Resolution {
- 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 collection_tests.js
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
var MongoDB = NpmModuleMongodb;
Tinytest.add(
'collection - call Mongo.Collection without new',
Function axis
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.svg.axis = function() {
var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
function axis(g) {
g.each(function() {
var g = d3.select(this);
Function initResizable
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
, initResizable = function (panes) {
var draggingAvailable = $.layout.plugins.draggable
, side // set in start()
;
panes = panes ? panes.split(",") : _c.borderPanes;
Function _makeDownloader
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
_makeDownloader: function (options) {
var self = this;
buildmessage.assertInJob();
if (!options.packageName) {
Function evaluate
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Logic.Solution.prototype.evaluate = function (formulaOrBits) {
var self = this;
if (assert) assert(formulaOrBits, isFormulaOrTermOrBits);
if (formulaOrBits instanceof Logic.Bits) {
- 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 buildCommand
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
var buildCommand = function (options) {
Console.setVerbose(!!options.verbose);
if (options.headless) {
// There's no point in spinning the spinner when we're running
// automated builds.
- 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 write
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
write(builder, {minifyMode, buildMode}) {
builder.reserve("program.json");
// Helper to iterate over all resources that we serve over HTTP.
const eachResource = function (f) {
Function oldRedirects
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
var oldRedirects = function() {
// make links backwards compatible - for example, #deps -> #tracker
// Links from the old basic API into the closest full-api section
var BASIC_TO_FULL_LINKS = {
Function voronoi
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.geom.voronoi = function(points) {
var size = null, x = d3_svg_lineX, y = d3_svg_lineY, clip;
if (arguments.length) return voronoi(points);
function voronoi(data) {
var points, polygons = data.map(function() {
File client.js
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
// TODO: add an api to Reify to update cached exports for a module
var ReifyEntry = require('/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/entry.js')
var SOURCE_URL_PREFIX = "meteor://\ud83d\udcbbapp";
Function addPane
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
, addPane = function (pane, force) {
if (!force && !isInitialized()) return;
var
o = options[pane]
, s = state[pane]
Function _copyDirectory
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
_copyDirectory({
from, to,
ignore,
specificFiles,
symlink,
Function diff_cleanupSemantic
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
diff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {
var changes = false;
var equalities = []; // Stack of indices where equalities are found.
var equalitiesLength = 0; // Keeping our own length var is faster in JS.
/** @type {?string} */
- 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 oldRedirects
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
var oldRedirects = function() {
// make links backwards compatible - for example, #deps -> #tracker
// Links from the old basic API into the closest full-api section
var BASIC_TO_FULL_LINKS = {
- 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 bundleAndDeploy
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
export async function bundleAndDeploy(options) {
if (options.recordPackageUsage === undefined) {
options.recordPackageUsage = true;
}
- 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 _makePluginApi
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
_makePluginApi: function (pluginName) {
var isopack = this;
/**
* @global