betajs/betajs-ui

View on GitHub

Showing 53 of 53 total issues

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

            _apply: function(value) {
                var node = this._node;
                var handler = node._handler;
                node.interactions = node.interactions || {};
                if (this._postfix in node.interactions && !node.interactions[this._postfix].destroyed()) {
Severity: Minor
Found in src/dynamics/interaction_partial.js - About 1 hr to fix

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

                _start: function() {
                    if (!this._abortable)
                        this.parent().disableScroll();
                    this.parent().trigger("scrollto");
                    this.on(this.element(), "scroll", function() {
    Severity: Minor
    Found in src/interactions/scroll.js - About 1 hr to fix

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

                  _end: function() {
                      this.trigger("unhover");
                      this.parent().modifier().revert();
                      inherited._end.call(this);
                  },
      Severity: Major
      Found in src/interactions/drop.js and 1 other location - About 1 hr to fix
      src/interactions/drop.js on lines 213..217

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

      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

                  _end: function() {
                      this.trigger("unhover");
                      this.parent().modifier().revert();
                      inherited._end.call(this);
                  }
      Severity: Major
      Found in src/interactions/drop.js and 1 other location - About 1 hr to fix
      src/interactions/drop.js on lines 157..161

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

      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 exports has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(grunt) {
      
          var pkg = grunt.file.readJSON('package.json');
          var gruntHelper = require('betajs-compile');
          var dist = 'betajs-ui';
      Severity: Minor
      Found in Gruntfile.js - About 1 hr to fix

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

                        var min = function(obj, coord) {
                            return obj[0][coord] <= obj[1][coord] ? obj[0][coord] : obj[1][coord];
                        };
        Severity: Major
        Found in src/interactions/pinch.js and 1 other location - About 1 hr to fix
        src/interactions/pinch.js on lines 125..127

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

        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 max = function(obj, coord) {
                            return obj[0][coord] >= obj[1][coord] ? obj[0][coord] : obj[1][coord];
                        };
        Severity: Major
        Found in src/interactions/pinch.js and 1 other location - About 1 hr to fix
        src/interactions/pinch.js on lines 122..124

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

        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 _rotateFix has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    _rotateFix: function() {
                        var itemsElementChildren = this.itemsElement().children;
                        var top_ws_height = this._whitespaceGetHeight(this.__top_white_space);
                        var bottom_ws_height = this._whitespaceGetHeight(this.__bottom_white_space);
                        var full_height = this.element().scrollHeight;
        Severity: Minor
        Found in src/interactions/loop_scroll.js - About 1 hr to fix

          Function constructor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      constructor: function(element, options, data) {
                          options = Objs.extend({
                              append_count: 25,
                              prepend_count: 25,
                              height_factor: 3,
          Severity: Minor
          Found in src/interactions/infinite_scroll.js - About 1 hr to fix

            Function _apply has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        _apply: function(value) {
                            var node = this._node;
                            var handler = node._handler;
                            node.gestures = node.gestures || {};
                            if (this._postfix in node.gestures && !node.gestures[this._postfix].destroyed())
            Severity: Minor
            Found in src/dynamics/gesture_partial.js - About 1 hr to fix

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

                                  x: min(this._last_coords, "x") - min(this._current_coords, "x") + max(this._current_coords, "x") - max(this._last_coords, "x"),
              Severity: Minor
              Found in src/interactions/pinch.js and 1 other location - About 55 mins to fix
              src/interactions/pinch.js on lines 130..130

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

              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

                                  y: min(this._last_coords, "y") - min(this._current_coords, "y") + max(this._current_coords, "y") - max(this._last_coords, "y")
              Severity: Minor
              Found in src/interactions/pinch.js and 1 other location - About 55 mins to fix
              src/interactions/pinch.js on lines 129..129

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

              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

                          destroy: function() {
                              this._modifier.revert();
                              this._modifier.destroy();
                              inherited.destroy.call(this);
                          },
              Severity: Minor
              Found in src/interactions/drop.js and 1 other location - About 55 mins to fix
              src/interactions/drag.js on lines 49..53

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

              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

                          destroy: function() {
                              this._modifier.revert();
                              this._modifier.destroy();
                              inherited.destroy.call(this);
                          },
              Severity: Minor
              Found in src/interactions/drag.js and 1 other location - About 55 mins to fix
              src/interactions/drop.js on lines 37..41

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

              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 4 locations. Consider refactoring.
              Open

                              this.on(this.element(), "drag-drop", function(event) {
                                  this._drag_source = event.detail;
                                  this.next("Dropping");
                              });
              Severity: Major
              Found in src/interactions/drop.js and 3 other locations - About 50 mins to fix
              src/interactions/drop.js on lines 147..150
              src/interactions/drop.js on lines 207..210
              src/interactions/drop_list.js on lines 142..145

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

              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 4 locations. Consider refactoring.
              Open

                              this.on(this.element(), "drag-drop drag-stop drag-leave", function(event) {
                                  this._drag_source = event.detail;
                                  this.next("Idle");
                              });
              Severity: Major
              Found in src/interactions/drop.js and 3 other locations - About 50 mins to fix
              src/interactions/drop.js on lines 147..150
              src/interactions/drop.js on lines 151..154
              src/interactions/drop_list.js on lines 142..145

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

              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 4 locations. Consider refactoring.
              Open

                              this.on(this.element(), "drag-stop drag-leave", function(event) {
                                  this._drag_source = event.detail;
                                  this.next("Idle");
                              });
              Severity: Major
              Found in src/interactions/drop_list.js and 3 other locations - About 50 mins to fix
              src/interactions/drop.js on lines 147..150
              src/interactions/drop.js on lines 151..154
              src/interactions/drop.js on lines 207..210

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

              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 4 locations. Consider refactoring.
              Open

                              this.on(this.element(), "drag-stop drag-leave", function(event) {
                                  this._drag_source = event.detail;
                                  this.next("Idle");
                              });
              Severity: Major
              Found in src/interactions/drop.js and 3 other locations - About 50 mins to fix
              src/interactions/drop.js on lines 151..154
              src/interactions/drop.js on lines 207..210
              src/interactions/drop_list.js on lines 142..145

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

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

                      dispatchPointsSeparatorEvent: function(element, label, included, excluded, data, options) {
              Severity: Minor
              Found in src/events/events_support.js - About 45 mins to fix

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

                                var sourceCenter = {
                                    left: sourceOffset.left + sourceDim.width / 2,
                                    top: sourceOffset.top + sourceDim.height / 2
                                };
                Severity: Minor
                Found in src/interactions/drop.js and 1 other location - About 45 mins to fix
                src/interactions/drop.js on lines 174..177

                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

                Severity
                Category
                Status
                Source
                Language