meteor/meteor

View on GitHub

Showing 2,031 of 3,395 total issues

File tropohouse.js has 409 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var _ = require("underscore");
var files = require('../fs/files');
var utils = require('../utils/utils.js');
var httpHelpers = require('../utils/http-helpers.js');
var archinfo = require('../utils/archinfo');
Severity: Minor
Found in tools/packaging/tropohouse.js - About 5 hrs to fix

    Function analyze has 145 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    CS.Solver.prototype.analyze = function () {
      var self = this;
      var analysis = self.analysis;
      var input = self.input;
      var cache = input.catalogCache;
    Severity: Major
    Found in packages/constraint-solver/solver.js - About 5 hrs to fix

      Function compileOneFile has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

        compileOneFile(inputFile, allFiles) {
          const referencedImportPaths = [];
      
          function parseImportPath(filePath, importerDir) {
            if (! filePath) {
      Severity: Minor
      Found in packages/deprecated/stylus/plugin/compile-stylus.js - About 5 hrs to fix

      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 _fiber has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

        _fiber: function () {
          var self = this;
          var firstRun = true;
      
          while (true) {
      Severity: Minor
      Found in tools/runners/run-app.js - About 5 hrs to fix

      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 httpcall_tests.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { HTTP } from 'meteor/http';
      
      // URL prefix for tests to talk to
      let _XHR_URL_PREFIX = '/http_test_responder';
      
      
      Severity: Minor
      Found in packages/deprecated/http/httpcall_tests.js - About 5 hrs to fix

        File WebAppLocalServer.java has 402 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        package com.meteor.webapp;
        
        import android.content.Context;
        import android.content.SharedPreferences;
        import android.content.res.AssetManager;

          Function maybeUpdateRelease has 141 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var maybeUpdateRelease = function (options) {
            // We are only updating packages, so we are not updating the release.
            if (options["packages-only"]) {
               return 0;
            }
          Severity: Major
          Found in tools/cli/commands-packages.js - About 5 hrs to fix

            File ejson.js has 401 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import {
              isFunction,
              isObject,
              keysOf,
              lengthOf,
            Severity: Minor
            Found in packages/ejson/ejson.js - About 5 hrs to fix

              Function _update has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
              Open

              MongoConnection.prototype._update = function (collection_name, selector, mod,
                                                            options, callback) {
                var self = this;
              
              
              
              Severity: Minor
              Found in packages/mongo/mongo_driver.js - About 5 hrs to fix

              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 match_bitap_ has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
              Open

              diff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {
                if (pattern.length > this.Match_MaxBits) {
                  throw new Error('Pattern too long for this browser.');
                }
              
              
              Severity: Minor
              Found in packages/test-in-browser/diff_match_patch_uncompressed.js - About 5 hrs to fix

              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 _initContainer has 139 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              ,    _initContainer = function () {
                      var
                          N        = $N[0]    
                      ,    $H        = $("html")
                      ,    tag        = sC.tagName = N.tagName
              Severity: Major
              Found in packages/deprecated/jquery-layout/jquery.layout.js - About 5 hrs to fix

                File fastclick.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                    /**
                     * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
                     *
                     * @codingstandard ftlabs-jsv2
                     * @copyright The Financial Times Limited [All Rights Reserved]
                Severity: Minor
                Found in packages/deprecated/fastclick/fastclick.js - About 5 hrs to fix

                  Function d3_geo_clipView has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function d3_geo_clipView(x0, y0, x1, y1) {
                      return function(listener) {
                        var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), segments, polygon, ring;
                        var clip = {
                          point: point,
                  Severity: Major
                  Found in packages/deprecated/d3/d3.v3.js - About 5 hrs to fix

                    Function enable has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      enable(otherProcess) {
                        if (typeof otherProcess.onMessage === "function" &&
                            typeof otherProcess.sendMessage === "function") {
                          // Calling enable more than once should be safe/idempotent.
                          return otherProcess;
                    Severity: Major
                    Found in packages/inter-process-messaging/inter-process-messaging.js - About 5 hrs to fix

                      File babel-compiler.js has 394 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      var semver = Npm.require("semver");
                      var JSON5 = Npm.require("json5");
                      /**
                       * A compiler that can be instantiated with features and used inside
                       * Plugin.registerCompiler
                      Severity: Minor
                      Found in packages/babel-compiler/babel-compiler.js - About 5 hrs to fix

                        File isopack-cache.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        var _ = require('underscore');
                        
                        var buildmessage = require('../utils/buildmessage.js');
                        var compiler = require('./compiler.js');
                        var files = require('../fs/files');
                        Severity: Minor
                        Found in tools/isobuild/isopack-cache.js - About 5 hrs to fix

                          File run.js has 391 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          // Represents a test run of the tool (except we also use it in
                          // tests/old.js to run Node scripts). Typically created through the
                          // run() method on Sandbox, but can also be created directly, say if
                          // you want to do something other than invoke the 'meteor' command in
                          // a nice sandbox.
                          Severity: Minor
                          Found in tools/tool-testing/run.js - About 5 hrs to fix

                            File match.js has 390 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            // XXX docs
                            import { isPlainObject } from './isPlainObject';
                            
                            // Things we explicitly do NOT support:
                            //    - heterogenous arrays
                            Severity: Minor
                            Found in packages/check/match.js - About 5 hrs to fix

                              Function launchOneMongoAndWaitForReadyForInitiate has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var launchOneMongoAndWaitForReadyForInitiate = function(
                                  dbPath,
                                  port,
                                  portFile
                                ) {
                              Severity: Major
                              Found in tools/runners/run-mongo.js - About 5 hrs to fix

                                Function zoom has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  d3.behavior.zoom = function() {
                                    var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
                                    function zoom() {
                                      this.on("mousedown.zoom", mousedown).on("mousemove.zoom", mousemove).on(d3_behavior_zoomWheel + ".zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
                                    }
                                Severity: Major
                                Found in packages/deprecated/d3/d3.v3.js - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language