ricarthlima/eo-project-es

View on GitHub

Showing 129 of 135 total issues

Function Button has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function () {
      function Button(element) {
        this._element = element;
      } // Getters

Severity: Major
Found in app/assets/javascripts/application.js - About 2 hrs to fix

    Function _showBackdrop has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          _proto._showBackdrop = function _showBackdrop(callback) {
            var _this8 = this;
    
            var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
    
    
    Severity: Major
    Found in app/assets/javascripts/application.js - About 2 hrs to fix

      Function show has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            _proto.show = function show() {
              var _this = this;
      
              if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
                return;
      Severity: Minor
      Found in app/assets/javascripts/application.js - About 1 hr to fix

        Function show has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              _proto.show = function show() {
                var _this = this;
        
                if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) {
                  return;
        Severity: Minor
        Found in app/assets/javascripts/application.js - About 1 hr to fix

          Function toggle has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                _proto.toggle = function toggle() {
                  if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
                    return;
                  }
          
          
          Severity: Minor
          Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                      } else if (Util.isElement(this._config.reference)) {
                        referenceElement = this._config.reference; // Check if it's jQuery element
            
                        if (typeof this._config.reference.jquery !== 'undefined') {
                          referenceElement = this._config.reference[0];
            Severity: Major
            Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/application.js on lines 1320..1328

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

            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 (Util.isElement(this._config.parent)) {
                      parent = this._config.parent; // It's a jQuery object
            
                      if (typeof this._config.parent.jquery !== 'undefined') {
                        parent = this._config.parent[0];
            Severity: Major
            Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/application.js on lines 1581..1587

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

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

                  _proto.hide = function hide(callback) {
                    var _this2 = this;
            
                    var tip = this.getTipElement();
                    var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
            Severity: Minor
            Found in app/assets/javascripts/application.js - About 1 hr to fix

              Function _clearMenus has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    Dropdown._clearMenus = function _clearMenus(event) {
                      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
                        return;
                      }
              
              
              Severity: Minor
              Found in app/assets/javascripts/application.js - About 1 hr to fix

                Function show has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      _proto.show = function show(relatedTarget) {
                        var _this = this;
                
                        if (this._isTransitioning || this._isShown) {
                          return;
                Severity: Minor
                Found in app/assets/javascripts/application.js - About 1 hr to fix

                  Function hide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        _proto.hide = function hide() {
                          var _this2 = this;
                  
                          if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
                            return;
                  Severity: Minor
                  Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                            context._timeout = setTimeout(function () {
                              if (context._hoverState === HoverState.SHOW) {
                                context.show();
                              }
                            }, context.config.delay.show);
                    Severity: Major
                    Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/application.js on lines 2995..2999

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

                    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

                            context._timeout = setTimeout(function () {
                              if (context._hoverState === HoverState.OUT) {
                                context.hide();
                              }
                            }, context.config.delay.hide);
                    Severity: Major
                    Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/application.js on lines 2963..2967

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

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

                          _proto.toggle = function toggle() {
                            var triggerChangeEvent = true;
                            var addAriaPressed = true;
                            var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                            Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
                              // If not input/textarea:
                              //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
                              // If input/textarea:
                              //  - If space key => not a dropdown command
                      Severity: Minor
                      Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                              _proto.getTipElement = function getTipElement() {
                                this.tip = this.tip || $$$1(this.config.template)[0];
                                return this.tip;
                              };
                        Severity: Major
                        Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
                        app/assets/javascripts/application.js on lines 3243..3246

                        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

                              _proto.getTipElement = function getTipElement() {
                                this.tip = this.tip || $$$1(this.config.template)[0];
                                return this.tip;
                              };
                        Severity: Major
                        Found in app/assets/javascripts/application.js and 1 other location - About 1 hr to fix
                        app/assets/javascripts/application.js on lines 2851..2854

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

                              _proto._showElement = function _showElement(relatedTarget) {
                                var _this3 = this;
                        
                                var transition = $$$1(this._element).hasClass(ClassName.FADE);
                        
                        
                        Severity: Minor
                        Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                                _proto.hide = function hide(event) {
                                  var _this2 = this;
                          
                                  if (event) {
                                    event.preventDefault();
                          Severity: Minor
                          Found in app/assets/javascripts/application.js - About 1 hr to fix

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

                                  _proto.refresh = function refresh() {
                                    var _this2 = this;
                            
                                    var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
                                    var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
                            Severity: Minor
                            Found in app/assets/javascripts/application.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language