preston/bittorious

View on GitHub

Showing 235 of 235 total issues

Function restangularizeElem has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

      function restangularizeElem(parent, element, route, fromServer, collection, reqParams) {
Severity: Minor
Found in lib/assets/bower_components/restangular/dist/restangular.js - About 45 mins to fix

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

        $scope.newTorrentDialog = function() {
            newTorrent();
            $("#create_torrent_dialog").modal();
            $("#create_torrent_dialog input[name='name']").focus();
        }
    app/assets/javascripts/angular-app/controllers/feedController.js on lines 65..69

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

    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

        $scope.newFeedDialog = function() {
            newFeed();
            $("#create_feed_dialog").modal();
            $("#create_feed_dialog input[name='name']").focus();
        };
    app/assets/javascripts/angular-app/controllers/feedController.js on lines 114..118

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

    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

        cancel: function() {
          if (this.host.cancel) {
            this.host.cancel();
          }
          this._resolve(false);
    Severity: Minor
    Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 45 mins to fix
    lib/assets/bower_components/angular-animate/angular-animate.js on lines 2586..2591

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

    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

    Method set_params_from_torrent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def set_params_from_torrent
            unless request.params['torrent']['torrent_file'].blank?
                torrent_params = request.params['torrent']
                b =
                    if torrent_params['torrent_file'].respond_to?(:path)
    Severity: Minor
    Found in app/controllers/torrents_controller.rb - About 45 mins 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

        end: function() {
          if (this.host.end) {
            this.host.end();
          }
          this._resolve(true);
    Severity: Minor
    Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 45 mins to fix
    lib/assets/bower_components/angular-animate/angular-animate.js on lines 2593..2598

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

    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

    Consider simplifying this complex logical expression.
    Open

          if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
              (isObjectLike(value) && isFunction(value.splice)))) {
            return !value.length;
          }
    Severity: Major
    Found in lib/assets/bower_components/lodash/lodash.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

            if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
                (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
              return false;
            }
      Severity: Major
      Found in lib/assets/bower_components/lodash/lodash.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                  if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
                    wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
                  } else {
                    wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
                  }
        Severity: Major
        Found in lib/assets/bower_components/lodash/lodash.js - About 40 mins to fix

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

                  var arrValue = array[index],
                      othValue = other[index],
                      result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
          Severity: Minor
          Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 40 mins to fix
          lib/assets/bower_components/lodash/lodash.js on lines 3817..3819

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

          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 objValue = object[key],
                      othValue = other[key],
                      result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
          Severity: Minor
          Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 40 mins to fix
          lib/assets/bower_components/lodash/lodash.js on lines 3721..3723

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

          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 transformElem has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              config.transformElem = function(elem, isCollection, route, Restangular, force) {
          Severity: Minor
          Found in lib/assets/bower_components/restangular/src/restangular.js - About 35 mins to fix

            Function groupEventedAnimations has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  function groupEventedAnimations(element, event, options, animations, fnName) {
            Severity: Minor
            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

              Function link has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  link: function(scope, $element, attr, ctrl, $transclude) {
              Severity: Minor
              Found in lib/assets/bower_components/angular-route/angular-route.js - About 35 mins to fix

                Function baseReduce has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
                Severity: Minor
                Found in lib/assets/bower_components/lodash/lodash.js - About 35 mins to fix

                  Function transformElem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      config.transformElem = function(elem, isCollection, route, Restangular, force) {
                  Severity: Minor
                  Found in lib/assets/bower_components/restangular/dist/restangular.js - About 35 mins to fix

                    Function executeAnimationFn has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                          function executeAnimationFn(fn, element, event, options, onDone) {
                    Severity: Minor
                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                      Function baseMerge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          function baseMerge(object, source, customizer, stackA, stackB) {
                      Severity: Minor
                      Found in lib/assets/bower_components/lodash/lodash.js - About 35 mins to fix

                        Function packageAnimations has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              function packageAnimations(element, event, options, animations, fnName) {
                        Severity: Minor
                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                          Function $get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                 function($$jqLite,   $rootScope,   $injector,   $$AnimateRunner,   $$rAFScheduler) {
                          Severity: Minor
                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language