Showing 2,031 of 3,395 total issues
Function d3_geom_voronoiTessellate
has 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geom_voronoiTessellate(points, callback) {
var Sites = {
list: points.map(function(v, i) {
return {
index: i,
File password_server.js
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { hash as bcryptHash, compare as bcryptCompare } from 'bcrypt';
import { Accounts } from "meteor/accounts-base";
// Utility for grabbing user
const getUserById = (id, options) => Meteor.users.findOne(id, Accounts._addDefaultFieldSelector(options));
File tracker_tests.js
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
Tinytest.add('tracker - run', function (test) {
var d = new Tracker.Dependency;
var x = 0;
var handle = Tracker.autorun(function (handle) {
d.depend();
File watch.ts
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Stats, BigIntStats, FSWatcher, Dirent } from "fs";
import * as files from "./files";
import * as safeWatcher from "./safe-watcher";
import { createHash } from "crypto";
import { coalesce } from "../utils/func-utils";
Function converter
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
Showdown.converter = function(converter_options) {
//
// Globals:
//
- 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 package-client.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var config = require('../meteor-services/config.js');
var httpHelpers = require('../utils/http-helpers.js');
var release = require('./release.js');
Function _cmp
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
_cmp(a, b) {
if (a === undefined) {
return b === undefined ? 0 : -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"
Further reading
File collection.js
has 579 lines of code (exceeds 250 allowed). Consider refactoring. Open
// options.connection, if given, is a LivedataClient or LivedataServer
// XXX presently there is no way to destroy/clean up a Collection
import {
ASYNC_COLLECTION_METHODS,
getAsyncMethodName,
File builder.js
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
import assert from "assert";
import {WatchSet, readAndWatchFile, sha1} from '../fs/watch';
import files, {
symlinkWithOverwrite, realpath,
} from '../fs/files';
Function findModTarget
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
function findModTarget(doc, keyparts, options = {}) {
let usedArrayIndex = false;
for (let i = 0; i < keyparts.length; i++) {
const last = i === keyparts.length - 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"
Further reading
Function _maybeSetUpReplication
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
_maybeSetUpReplication(name, { _suppressSameNameError = false }) {
const self = this;
if (!(self._connection && self._connection.registerStore)) {
return;
}
- 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 initHtml4
has 232 lines of code (exceeds 25 allowed). Consider refactoring. Open
History.initHtml4 = function(){
// Initialise
if ( typeof History.initHtml4.initialized !== 'undefined' ) {
// Already Loaded
return false;
File tinytest.js
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
import isEqual from "lodash.isequal";
/******************************************************************************/
/* TestCaseResults */
/******************************************************************************/
File builder.js
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'underscore';
import url from 'url';
import { Console } from '../console/console.js';
import buildmessage from '../utils/buildmessage.js';
import files from '../fs/files';
Function _getAnswer
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
CS.Solver.prototype._getAnswer = function (options) {
var self = this;
var input = self.input;
var analysis = self.analysis;
var cache = input.catalogCache;
Function publishPackage
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
exports.publishPackage = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
var projectContext = options.projectContext;
- 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 publishPackage
has 216 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.publishPackage = function (options) {
buildmessage.assertInJob();
var packageSource = options.packageSource;
var conn = options.connection;
var projectContext = options.projectContext;
Function _retrySubscription
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
Autoupdate._retrySubscription = () => {
Meteor.subscribe("meteor_autoupdate_clientVersions", {
onError(error) {
Meteor._debug("autoupdate subscription failed", error);
failures++;
- 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 brush
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.svg.brush = function() {
var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
function brush(g) {
g.each(function() {
var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
Function diff_bisect_
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
diff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {
// Cache the text lengths to prevent multiple calls.
var text1_length = text1.length;
var text2_length = text2.length;
var max_d = Math.ceil((text1_length + text2_length) / 2);
- 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"