meteor/meteor

View on GitHub

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
Severity: Minor
Found in tools/tool-testing/sandbox.js - About 5 hrs to fix

    Function write has 132 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      write(builder, {
        buildMode,
        // falsy or 'symlink', documented on exports.bundle
        includeNodeModules,
      } = {}) {
    Severity: Major
    Found in tools/isobuild/bundler.js - About 5 hrs to fix

      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.
        //
      Severity: Minor
      Found in tools/cli/commands.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 resolve has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

        public resolve(
          id: string,
          absParentPath: string,
          _seenDirPaths?: Set<string>,
        ): Resolution {
      Severity: Minor
      Found in tools/isobuild/resolver.ts - 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 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',
      Severity: Minor
      Found in packages/mongo/collection_tests.js - About 5 hrs to fix

        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);
        Severity: Major
        Found in packages/deprecated/d3/d3.v3.js - About 5 hrs to fix

          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;
          Severity: Major
          Found in packages/deprecated/jquery-layout/jquery.layout.js - About 5 hrs to fix

            Function _makeDownloader has 124 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              _makeDownloader: function (options) {
                var self = this;
                buildmessage.assertInJob();
            
                if (!options.packageName) {
            Severity: Major
            Found in tools/packaging/tropohouse.js - About 4 hrs to fix

              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) {
              Severity: Minor
              Found in packages/logic-solver/logic.js - About 4 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 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.
              Severity: Minor
              Found in tools/cli/commands.js - About 4 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 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) {
              Severity: Major
              Found in tools/isobuild/bundler.js - About 4 hrs to fix

                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 = {
                Severity: Major
                Found in docs/scripts/old-redirects.js - About 4 hrs to fix

                  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() {
                  Severity: Major
                  Found in packages/deprecated/d3/d3.v3.js - About 4 hrs to fix

                    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";
                    
                    
                    Severity: Minor
                    Found in packages/hot-module-replacement/client.js - About 4 hrs to fix

                      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]
                      Severity: Major
                      Found in packages/deprecated/jquery-layout/jquery.layout.js - About 4 hrs to fix

                        Function _copyDirectory has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          _copyDirectory({
                            from, to,
                            ignore,
                            specificFiles,
                            symlink,
                        Severity: Major
                        Found in tools/isobuild/builder.js - About 4 hrs to fix

                          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} */
                          Severity: Minor
                          Found in packages/test-in-browser/diff_match_patch_uncompressed.js - About 4 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 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 = {
                          Severity: Minor
                          Found in docs/scripts/old-redirects.js - About 4 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 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;
                            }
                          
                          
                          Severity: Minor
                          Found in tools/meteor-services/deploy.js - About 4 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 _makePluginApi has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            _makePluginApi: function (pluginName) {
                              var isopack = this;
                          
                              /**
                               * @global
                          Severity: Major
                          Found in tools/isobuild/isopack.js - About 4 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language