Reactive-Extensions/RxJS

View on GitHub

Showing 1,013 of 2,890 total issues

Avoid too many return statements within this function.
Open

if (isFunction(obj)) { return thunkToObservable.call(this, obj); }
Severity: Major
Found in modules/rx-lite-async-compat/rx.lite.async.compat.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

    if (isFunction(obj)) { return thunkToObservable.call(this, obj); }
    Severity: Major
    Found in modules/rx-lite-async/rx.lite.async.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

      return obj;
      Severity: Major
      Found in modules/rx-lite-async-compat/rx.lite.async.compat.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return obj;
        Severity: Major
        Found in modules/rx-lite-async/rx.lite.async.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

          return true;
          Severity: Major
          Found in modules/rx-core-testing/rx.core.testing.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

            if (isObject(obj)) {return objectToObservable.call(this, obj);}
            Severity: Major
            Found in modules/rx-lite-async/rx.lite.async.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

              return result;
              Severity: Major
              Found in modules/rx-core-testing/rx.core.testing.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                if (isArrayLike(obj) || isIterable(obj)) { return arrayToObservable.call(this, obj); }
                Severity: Major
                Found in modules/rx-lite-async/rx.lite.async.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                  return true;
                  Severity: Major
                  Found in modules/rx-core-testing/rx.core.testing.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                    if (isObject(obj)) {return objectToObservable.call(this, obj);}
                    Severity: Major
                    Found in modules/rx-lite-async-compat/rx.lite.async.compat.js - About 30 mins to fix

                      Function toString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jasmine.MessageResult.prototype.toString = function() {
                      var text = "";
                      for (var i = 0; i < this.values.length; i++) {
                      if (i > 0) text += " ";
                      if (jasmine.isString_(this.values[i])) {
                      Severity: Minor
                      Found in examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 25 mins to fix

                      Function contains_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jasmine.Env.prototype.contains_ = function(haystack, needle) {
                      if (jasmine.isArray_(haystack)) {
                      for (var i = 0; i < haystack.length; i++) {
                      if (this.equals_(haystack[i], needle)) return true;
                      }
                      Severity: Minor
                      Found in examples/testing/jasmine/lib/jasmine-1.3.1/jasmine.js - About 25 mins to fix

                      Function assertEqual has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      assertEqual: function (expected, actual, comparer, message) {
                      comparer || (comparer = Rx.internals.isEqual);
                      var isOk = true, i, len;
                       
                      if (expected.length !== actual.length) {
                      Severity: Minor
                      Found in examples/testing/nodejs/collectionassert.js - About 25 mins to fix

                      Function cacheChars has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      ut.WebGLRenderer.prototype.cacheChars = function(chars, build) {
                      "use strict";
                      if (!this.gl) return; // Nothing to do if not using WebGL renderer
                      var changed = false;
                      for (var i = 0; i < chars.length; ++i) {
                      Severity: Minor
                      Found in examples/pacman-unicode/unicodetiles/ut.WebGLRenderer.js - About 25 mins to fix

                      Function updateStyle has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      ut.DOMRenderer.prototype.updateStyle = function(s) {
                      "use strict";
                      s = window.getComputedStyle(this.spans[0][0], null);
                      this.tw = parseInt(s.width, 10);
                      if (this.tw === 0 || isNaN(this.tw)) return; // Nothing to do, exit
                      Severity: Minor
                      Found in examples/pacman-unicode/unicodetiles/ut.DOMRenderer.js - About 25 mins to fix

                      Function reportRunnerResults has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
                      var results = runner.results();
                      var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
                      this.runnerDiv.setAttribute("class", className);
                      //do it twice for IE
                      Severity: Minor
                      Found in examples/testing/jasmine/lib/jasmine-1.3.1/jasmine-html.js - About 25 mins to fix

                      Function putString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      ut.Viewport.prototype.putString = function(str, x, y, r, g, b, br, bg, bb) {
                      var len = str.length;
                      var tile;
                      if (x < 0 || y < 0) return;
                      for (var i = 0; i < len; ++i) {
                      Severity: Minor
                      Found in examples/pacman-unicode/unicodetiles/unicodetiles.js - About 25 mins to fix

                      Function plucker has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function plucker(args, len) {
                      return function mapper(x) {
                      var currentProp = x;
                      for (var i = 0; i < len; i++) {
                      var p = currentProp[args[i]];
                      Severity: Minor
                      Found in src/modular/observable/pluck.js - About 25 mins to fix

                      Function next has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      DelayRelativeObserver.prototype.next = function (notification) {
                      var shouldRun;
                      if (notification.value.kind === 'E') {
                      this._s.q = [];
                      this._s.q.push(notification);
                      Severity: Minor
                      Found in src/modular/observable/delay.js - About 25 mins to fix

                      Function heapify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      PriorityQueue.prototype.heapify = function (index) {
                      +index || (index = 0);
                      if (index >= this.length || index < 0) { return; }
                      var left = 2 * index + 1,
                      right = 2 * index + 2,
                      Severity: Minor
                      Found in src/modular/internal/priorityqueue.js - About 25 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language