meteor/meteor

View on GitHub

Showing 2,031 of 3,395 total issues

Function _populateWarehouseForRelease has 117 lines of code (exceeds 25 allowed). Consider refactoring.
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');
Severity: Major
Found in tools/packaging/warehouse.js - About 4 hrs to fix

    `` has 36 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Object.assign(RemoteCatalog.prototype, {
      toString: function () {
        var self = this;
        return "RemoteCatalog";
      },
    Severity: Minor
    Found in tools/packaging/catalog/catalog-remote.js - About 4 hrs to fix

      File WebAppLocalServer.swift has 360 lines of code (exceeds 250 allowed). Consider refactoring.
      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

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

          Function call has 115 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          HTTP.call = function(method, url, options, callback) {
          
            ////////// Process arguments //////////
          
            if (! callback && typeof options === "function") {
          Severity: Major
          Found in packages/deprecated/http/httpcall_client.js - About 4 hrs to fix

            Function _linkJS has 115 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              _linkJS(jsResources, onCacheKey = () => {}) {
                const self = this;
                buildmessage.assertInJob();
            
                var bundleArch = self.processor.arch;
            Severity: Major
            Found in tools/isobuild/compiler-plugin.js - About 4 hrs to fix

              File ddp-rate-limiter-tests.js has 355 lines of code (exceeds 250 allowed). Consider refactoring.
              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';
              
              
              Severity: Minor
              Found in packages/ddp-rate-limiter/ddp-rate-limiter-tests.js - About 4 hrs to fix

                Function sizeHandles has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                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) {
                Severity: Major
                Found in packages/deprecated/jquery-layout/jquery.layout.js - About 4 hrs to fix

                  WebAppLocalServer has 35 methods (exceeds 20 allowed). Consider refactoring.
                  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

                    export class AccountsClient extends AccountsCommon {
                      constructor(options) {
                        super(options);
                    
                        this._loggingIn = new ReactiveVar(false);
                    Severity: Minor
                    Found in packages/accounts-base/accounts_client.js - About 4 hrs to fix

                      `` has 35 functions (exceeds 20 allowed). Consider refactoring.
                      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);
                      Severity: Minor
                      Found in tools/project-context.js - About 4 hrs to fix

                        Function mergeCss has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const mergeCss = Profile("mergeCss", async function (css, postcssConfig) {
                          // Filenames passed to AST manipulator mapped to their original files
                          const originals = {};
                          const deps = [];
                        
                        
                        Severity: Major
                        Found in packages/standard-minifier-css/plugin/minify-css.js - About 4 hrs to fix

                          File http-helpers.js has 353 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          ///
                          /// utility functions for dealing with urls and http
                          ///
                          
                          var os = require('os');
                          Severity: Minor
                          Found in tools/utils/http-helpers.js - About 4 hrs to fix

                            Function staticFilesMiddleware has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            WebAppInternals.staticFilesMiddleware = async function(
                              staticFilesByArch,
                              req,
                              res,
                              next
                            Severity: Major
                            Found in packages/webapp/webapp_server.js - About 4 hrs to fix

                              Function chord has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                              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 = [];
                              Severity: Major
                              Found in packages/deprecated/d3/d3.v3.js - About 4 hrs to fix

                                Function sizePane has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                                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]
                                Severity: Major
                                Found in packages/deprecated/jquery-layout/jquery.layout.js - About 4 hrs to fix

                                  Function initFromPackageDir has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    }, function (dir, options) {
                                      var self = this;
                                      buildmessage.assertInCapture();
                                      var isPortable = true;
                                      options = options || {};
                                  Severity: Minor
                                  Found in tools/isobuild/package-source.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 _observeFromObserveChanges has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  LocalCollection._observeFromObserveChanges = (cursor, observeCallbacks) => {
                                    const transform = cursor.getTransform() || (doc => doc);
                                    let suppressed = !!observeCallbacks._suppress_initial;
                                  
                                    let observeChangesCallbacks;
                                  Severity: Major
                                  Found in packages/minimongo/local_collection.js - About 4 hrs to fix

                                    Function startNewWatcher has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function startNewWatcher(absPath: string): Entry {
                                      let stat: Stats | BigIntStats | null | undefined = null;
                                    
                                      if (DEDUPLICATE_BY_INO) {
                                        stat = statOrNull(absPath);
                                    Severity: Major
                                    Found in tools/fs/safe-watcher.ts - About 4 hrs to fix

                                      Function _inferHelper has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      BCp._inferHelper = function (inputFile, cacheEntry) {
                                        if (! cacheEntry.controlFileData) {
                                          return false;
                                        }
                                      
                                      
                                      Severity: Major
                                      Found in packages/babel-compiler/babel-compiler.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language