preston/bittorious

View on GitHub

Showing 235 of 235 total issues

Consider simplifying this complex logical expression.
Open

      if ((value < other && !valIsNull) || !othIsReflexive ||
          (othIsNull && !valIsUndef && valIsReflexive) ||
          (othIsUndef && valIsReflexive)) {
        return -1;
      }
Severity: Critical
Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

    Function baseIsMatch has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function baseIsMatch(object, matchData, customizer) {
          var index = matchData.length,
              length = index,
              noCustomizer = !customizer;
    
    
    Severity: Minor
    Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

      Function baseDifference has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function baseDifference(array, values) {
            var length = array ? array.length : 0,
                result = [];
      
            if (!length) {
      Severity: Minor
      Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

        Function base has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Path.prototype.base = function(current) {
              var __this = this;
              return  _.reduce(this.parentsArray(current), function(acum, elem) {
                var elemUrl;
                var elemSelfLink = __this.config.getUrlFromElem(elem);
        Severity: Minor
        Found in lib/assets/bower_components/restangular/dist/restangular.js - About 1 hr to fix

          Function base has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Path.prototype.base = function(current) {
                var __this = this;
                return  _.reduce(this.parentsArray(current), function(acum, elem) {
                  var elemUrl;
                  var elemSelfLink = __this.config.getUrlFromElem(elem);
          Severity: Minor
          Found in lib/assets/bower_components/restangular/src/restangular.js - About 1 hr to fix

            Function intersection has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var intersection = restParam(function(arrays) {
                  var othLength = arrays.length,
                      othIndex = othLength,
                      caches = Array(length),
                      indexOf = getIndexOf(),
            Severity: Minor
            Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

              Function methodName has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    lodash.prototype[methodName] = function() {
                      var args = retUnwrapped ? [1] : arguments,
                          chainAll = this.__chain__,
                          value = this.__wrapped__,
                          isHybrid = !!this.__actions__.length,
              Severity: Minor
              Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                Function packageAnimations has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function packageAnimations(element, event, options, animations, fnName) {
                        var operations = groupEventedAnimations(element, event, options, animations, fnName);
                        if (operations.length === 0) {
                          var a,b;
                          if (fnName === 'beforeSetClass') {
                Severity: Minor
                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                  Function createHybridWrapper has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
                  Severity: Major
                  Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                    Function random has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function random(min, max, floating) {
                          if (floating && isIterateeCall(min, max, floating)) {
                            max = floating = undefined;
                          }
                          var noMin = min == null,
                    Severity: Minor
                    Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                      Method register_peer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def register_peer(peer_params, user = nil)
                              torrent = Torrent.where(info_hash: peer_params[:info_hash]).first
                              peer = Peer.find_or_create_by!(torrent_id: torrent, peer_id: peer_params[:peer_id])
                              peer.torrent = torrent
                              peer.update_attributes(
                      Severity: Minor
                      Found in app/models/torrent.rb - About 1 hr to fix

                        Function executeAnimationFn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function executeAnimationFn(fn, element, event, options, onDone) {
                                var args;
                                switch (event) {
                                  case 'animate':
                                    args = [element, options.from, options.to, onDone];
                        Severity: Minor
                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                          Function groupEventedAnimations has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                function groupEventedAnimations(element, event, options, animations, fnName) {
                                  var operations = [];
                                  forEach(animations, function(ani) {
                                    var animation = ani[fnName];
                                    if (!animation) return;
                          Severity: Minor
                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                            Function baseMerge has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function baseMerge(object, source, customizer, stackA, stackB) {
                                  if (!isObject(object)) {
                                    return object;
                                  }
                                  var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
                            Severity: Minor
                            Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                              Function okCallback has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      var okCallback = function(response) {
                                        var resData = response.data;
                                        var fullParams = response.config.params;
                                        var elem = parseResponse(resData, operation, route, fetchUrl, response, deferred);
                                        if (elem) {
                              Severity: Minor
                              Found in lib/assets/bower_components/restangular/src/restangular.js - About 1 hr to fix

                                Function okCallback has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        var okCallback = function(response) {
                                          var resData = response.data;
                                          var fullParams = response.config.params;
                                          var elem = parseResponse(resData, operation, route, fetchUrl, response, deferred);
                                          if (elem) {
                                Severity: Minor
                                Found in lib/assets/bower_components/restangular/dist/restangular.js - About 1 hr to fix

                                  Function binaryIndexBy has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function binaryIndexBy(array, value, iteratee, retHighest) {
                                        value = iteratee(value);
                                  
                                        var low = 0,
                                            high = array ? array.length : 0,
                                  Severity: Minor
                                  Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                                    Function start has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            start: function() {
                                              var runner;
                                    
                                              var currentAnimation = startingAnimator.start();
                                              currentAnimation.done(function() {
                                    Severity: Minor
                                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                                            if (typeof func != 'function') {
                                              if (typeof n == 'function') {
                                                var temp = n;
                                                n = func;
                                                func = temp;
                                      Severity: Major
                                      Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 1 hr to fix
                                      lib/assets/bower_components/lodash/lodash.js on lines 7352..7360

                                      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 58.

                                      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

                                            if (typeof func != 'function') {
                                              if (typeof n == 'function') {
                                                var temp = n;
                                                n = func;
                                                func = temp;
                                      Severity: Major
                                      Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 1 hr to fix
                                      lib/assets/bower_components/lodash/lodash.js on lines 7293..7301

                                      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 58.

                                      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