olneyhymn/westminster-daily

View on GitHub

Showing 96 of 96 total issues

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

    _proto.show = function show() {
      var _this = this;

      if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
        return;
Severity: Major
Found in static/js/bootstrap.js - About 2 hrs to fix

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

          if (this._config.animation) {
            var transitionDuration = Util.getTransitionDurationFromElement(this._element);
            $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
          } else {
            complete();
    Severity: Major
    Found in static/js/bootstrap.js and 1 other location - About 2 hrs to fix
    static/js/bootstrap.js on lines 4083..4088

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

    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 (this._config.animation) {
            var transitionDuration = Util.getTransitionDurationFromElement(this._element);
            $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
          } else {
            complete();
    Severity: Major
    Found in static/js/bootstrap.js and 1 other location - About 2 hrs to fix
    static/js/bootstrap.js on lines 4149..4154

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

    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 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 && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {
            return;
    Severity: Minor
    Found in static/js/bootstrap.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 || $(this._element).hasClass(ClassName$4.DISABLED)) {
              return;
            }
      
      
      Severity: Minor
      Found in static/js/bootstrap.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 static/js/bootstrap.js and 1 other location - About 1 hr to fix
        static/js/bootstrap.js on lines 1389..1397

        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 static/js/bootstrap.js and 1 other location - About 1 hr to fix
        static/js/bootstrap.js on lines 1638..1644

        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 = $.Event(this.constructor.Event.HIDE);
        Severity: Minor
        Found in static/js/bootstrap.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 static/js/bootstrap.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 || !$(this._element).hasClass(ClassName$3.SHOW)) {
                    return;
            Severity: Minor
            Found in static/js/bootstrap.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 static/js/bootstrap.js and 1 other location - About 1 hr to fix
              static/js/bootstrap.js on lines 3107..3111

              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 static/js/bootstrap.js and 1 other location - About 1 hr to fix
              static/js/bootstrap.js on lines 3075..3079

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

                  _proto.show = function show(relatedTarget) {
                    var _this = this;
              
                    if (this._isShown || this._isTransitioning) {
                      return;
              Severity: Minor
              Found in static/js/bootstrap.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 static/js/bootstrap.js - About 1 hr to fix

                  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 = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
                  
                  
                  Severity: Minor
                  Found in static/js/bootstrap.js - About 1 hr to fix

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

                        _proto._showElement = function _showElement(relatedTarget) {
                          var _this3 = this;
                    
                          var transition = $(this._element).hasClass(ClassName$5.FADE);
                    
                    
                    Severity: Minor
                    Found in static/js/bootstrap.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 || $(this.config.template)[0];
                            return this.tip;
                          };
                      Severity: Major
                      Found in static/js/bootstrap.js and 1 other location - About 1 hr to fix
                      static/js/bootstrap.js on lines 3345..3348

                      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 || $(this.config.template)[0];
                            return this.tip;
                          };
                      Severity: Major
                      Found in static/js/bootstrap.js and 1 other location - About 1 hr to fix
                      static/js/bootstrap.js on lines 2950..2953

                      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 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 static/js/bootstrap.js - About 1 hr to fix

                        Function _setListeners has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _proto._setListeners = function _setListeners() {
                              var _this3 = this;
                        
                              var triggers = this.config.trigger.split(' ');
                              triggers.forEach(function (trigger) {
                        Severity: Minor
                        Found in static/js/bootstrap.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language