Showing 2,031 of 3,395 total issues
Function _populateWarehouseForRelease
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_populateWarehouseForRelease: function (releaseVersion, showInstalling) {
var releasesDir = files.pathJoin(warehouse.getWarehouseDir(), 'releases');
files.mkdir_p(releasesDir, 0o755);
var releaseManifestPath = files.pathJoin(releasesDir,
releaseVersion + '.release.json');
`` has 36 functions (exceeds 20 allowed). Consider refactoring. Open
Open
Object.assign(RemoteCatalog.prototype, {
toString: function () {
var self = this;
return "RemoteCatalog";
},
File WebAppLocalServer.swift
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import WebKit
let oneYearInSeconds = 60 * 60 * 24 * 365
let GCDWebServerRequestAttribute_Asset = "GCDWebServerRequestAttribute_Asset"
Function _update
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MongoConnection.prototype._update = function (collection_name, selector, mod,
options, callback) {
var self = this;
Function call
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
HTTP.call = function(method, url, options, callback) {
////////// Process arguments //////////
if (! callback && typeof options === "function") {
Function _linkJS
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_linkJS(jsResources, onCacheKey = () => {}) {
const self = this;
buildmessage.assertInJob();
var bundleArch = self.processor.arch;
File ddp-rate-limiter-tests.js
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
import { Accounts } from 'meteor/accounts-base';
import { RATE_LIMIT_NUM_CALLS, RATE_LIMIT_INTERVAL_TIME_MS } from './ddp-rate-limiter-tests-common';
Function sizeHandles
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, sizeHandles = function (evt_or_panes) {
var panes = evtPane.call(this, evt_or_panes)
panes = panes ? panes.split(",") : _c.borderPanes;
$.each(panes, function (i, pane) {
WebAppLocalServer
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class WebAppLocalServer extends CordovaPlugin implements AssetBundleManager.Callback {
private static final String LOG_TAG = "MeteorWebApp";
public static final String PREFS_NAME = "MeteorWebApp";
private static final String LOCAL_FILESYSTEM_PATH = "/local-filesystem";
AccountsClient
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class AccountsClient extends AccountsCommon {
constructor(options) {
super(options);
this._loggingIn = new ReactiveVar(false);
`` has 35 functions (exceeds 20 allowed). Consider refactoring. Open
Open
Object.assign(ProjectContext.prototype, {
reset: function (moreOptions, resetOptions) {
var self = this;
// Allow overriding some options until the next call to reset;
var options = Object.assign({}, self.originalOptions, moreOptions);
Function mergeCss
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mergeCss = Profile("mergeCss", async function (css, postcssConfig) {
// Filenames passed to AST manipulator mapped to their original files
const originals = {};
const deps = [];
File http-helpers.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
///
/// utility functions for dealing with urls and http
///
var os = require('os');
Function staticFilesMiddleware
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebAppInternals.staticFilesMiddleware = async function(
staticFilesByArch,
req,
res,
next
Function chord
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.chord = function() {
var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
function relayout() {
var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
chords = [];
Function sizePane
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
if (!isInitialized()) return;
var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
, o = options[pane]
, s = state[pane]
Function initFromPackageDir
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
}, function (dir, options) {
var self = this;
buildmessage.assertInCapture();
var isPortable = true;
options = options || {};
- 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 _observeFromObserveChanges
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
LocalCollection._observeFromObserveChanges = (cursor, observeCallbacks) => {
const transform = cursor.getTransform() || (doc => doc);
let suppressed = !!observeCallbacks._suppress_initial;
let observeChangesCallbacks;
Function startNewWatcher
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function startNewWatcher(absPath: string): Entry {
let stat: Stats | BigIntStats | null | undefined = null;
if (DEDUPLICATE_BY_INO) {
stat = statOrNull(absPath);
Function _inferHelper
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BCp._inferHelper = function (inputFile, cacheEntry) {
if (! cacheEntry.controlFileData) {
return false;
}