phadej/menrva

View on GitHub

Showing 363 of 363 total issues

Consider simplifying this complex logical expression.
Open

            if ( event.pageX == null && original.clientX != null ) {
                eventDoc = event.target.ownerDocument || document;
                doc = eventDoc.documentElement;
                body = eventDoc.body;

Severity: Critical
Found in lib/jquery.js - About 5 hrs to fix

    Function baseIsEqual has 116 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
          // used to indicate that when comparing objects, `a` has at least the properties of `b`
          if (callback) {
            var result = callback(a, b);
            if (typeof result != 'undefined') {
    Severity: Major
    Found in lib/lodash.js - About 4 hrs to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                  onCompleted: function () {
                      checkDisposed.call(this);
                      if (!this.isStopped) {
                          var os = this.observers.slice(0);
                          this.isStopped = true;
      Severity: Major
      Found in lib/rx.lite.js and 1 other location - About 4 hrs to fix
      lib/rx.lite.js on lines 5186..5197

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 124.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                  onCompleted: function () {
                      checkDisposed.call(this);
                      if (!this.isStopped) {
                          var os = this.observers.slice(0);
                          this.isStopped = true;
      Severity: Major
      Found in lib/rx.lite.js and 1 other location - About 4 hrs to fix
      lib/rx.lite.js on lines 5470..5481

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 124.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          var ReplaySubject = Rx.ReplaySubject = (function (_super) {
      
              function RemovableDisposable (subject, observer) {
                  this.subject = subject;
                  this.observer = observer;
      Severity: Major
      Found in lib/rx.lite.js - About 4 hrs to fix

        Function ControlledSubject has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var ControlledSubject = Rx.ControlledSubject = (function (_super) {
        
                function subscribe (observer) {
                    return this.subject.subscribe(observer);
                }
        Severity: Major
        Found in lib/rx.lite.js - About 4 hrs to fix

          Function defaultPrefilter has 99 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function defaultPrefilter( elem, props, opts ) {
              /* jshint validthis: true */
              var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
                  anim = this,
                  orig = {},
          Severity: Major
          Found in lib/jquery.js - About 3 hrs to fix

            Function debounce has 93 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function debounce(func, wait, options) {
                  var args,
                      maxTimeoutId,
                      result,
                      stamp,
            Severity: Major
            Found in lib/lodash.js - About 3 hrs to fix

              Function deepEquals has 92 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function deepEquals(a, b, stackA, stackB) {
                  // exit early for identical values
                  if (a === b) {
                    // treat `+0` vs. `-0` as not equal
                    return a !== 0 || (1 / a == 1 / b);
              Severity: Major
              Found in lib/rx.lite.js - About 3 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    switch (className) {
                      case boolClass:
                      case dateClass:
                        // coerce dates and booleans to numbers, dates to milliseconds and booleans
                        // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
                Severity: Major
                Found in lib/rx.lite.js and 1 other location - About 3 hrs to fix
                lib/lodash.js on lines 1093..1112

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 107.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                      switch (className) {
                        case boolClass:
                        case dateClass:
                          // coerce dates and booleans to numbers, dates to milliseconds and booleans
                          // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
                Severity: Major
                Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                lib/rx.lite.js on lines 247..266

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 107.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Function trigger has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    trigger: function( event, data, elem, onlyHandlers ) {
                
                        var i, cur, tmp, bubbleType, ontype, handle, special,
                            eventPath = [ elem || document ],
                            type = hasOwn.call( event, "type" ) ? event.type : event,
                Severity: Major
                Found in lib/jquery.js - About 3 hrs to fix

                  Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Animation( elem, properties, options ) {
                      var result,
                          stopped,
                          index = 0,
                          length = animationPrefilters.length,
                  Severity: Major
                  Found in lib/jquery.js - About 3 hrs to fix

                    Function AsyncSubject has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var AsyncSubject = Rx.AsyncSubject = (function (_super) {
                    
                            function subscribe(observer) {
                                checkDisposed.call(this);
                                
                    Severity: Major
                    Found in lib/rx.lite.js - About 3 hrs to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                            if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {
                              var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);
                            } else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {
                              callback = args[--argsLength];
                            }
                      Severity: Major
                      Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                      lib/lodash.js on lines 2690..2694

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 101.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                            if (length > 3 && typeof args[length - 2] == 'function') {
                              var callback = baseCreateCallback(args[--length - 1], args[length--], 2);
                            } else if (length > 2 && typeof args[length - 1] == 'function') {
                              callback = args[--length];
                            }
                      Severity: Major
                      Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                      lib/lodash.js on lines 1685..1689

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 101.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Sizzle( selector, context, results, seed ) {
                          var match, elem, m, nodeType,
                              // QSA vars
                              i, groups, old, nid, newContext, newSelector;
                      
                      
                      Severity: Major
                      Found in lib/jquery.js - About 3 hrs to fix

                        Function commit has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Transaction.prototype.commit = function () {
                        
                          // clear timeout
                          if (this.commitScheduled) {
                            clearTimeout(this.commitScheduled);
                        Severity: Minor
                        Found in src/transaction.js - About 2 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

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                          var $counter =
                            // map up to 1, down to -1
                            $up.map(function () { return 1; }).merge($down.map(function () { return -1; }))
                            .scan(0, function(x,y) { return Math.max(MIN_VALUE, x + y); })
                            .startWith(0);
                        Severity: Major
                        Found in examples/counter/counter-rxjs.js and 1 other location - About 2 hrs to fix
                        examples/counter/counter-rxjs-behavior.js on lines 28..32

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 91.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                          var $state =
                            // map up to 1, down to -1
                            $up.map(function () { return 1; }).merge($down.map(function () { return -1; }))
                            .scan(0, function(x,y) { return Math.max(MIN_VALUE, x + y); })
                            .startWith(0);
                        Severity: Major
                        Found in examples/counter/counter-rxjs-behavior.js and 1 other location - About 2 hrs to fix
                        examples/counter/counter-rxjs.js on lines 16..20

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 91.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language