Reactive-Extensions/RxJS

View on GitHub
examples/assets/bootstrap/js/bootstrap.js

Summary

Maintainability
F
1 wk
Test Coverage

Showing 36 of 36 total issues

File bootstrap.js has 1517 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* ===================================================
* bootstrap-transition.js v2.3.2
* http://getbootstrap.com/2.3.2/javascript.html#transitions
* ===================================================
* Copyright 2013 Twitter, Inc.
Severity: Major
Found in examples/assets/bootstrap/js/bootstrap.js - About 4 days to fix

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

    , slide: function (type, next) {
    var $active = this.$element.find('.item.active')
    , $next = next || $active[type]()
    , isCycling = this.interval
    , direction = type == 'next' ? 'left' : 'right'
    Severity: Minor
    Found in examples/assets/bootstrap/js/bootstrap.js - About 1 hr to fix

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

      , show: function () {
      var $tip
      , pos
      , actualWidth
      , actualHeight
      Severity: Minor
      Found in examples/assets/bootstrap/js/bootstrap.js - About 1 hr to fix

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

        , applyPlacement: function(offset, placement){
        var $tip = this.tip()
        , width = $tip[0].offsetWidth
        , height = $tip[0].offsetHeight
        , actualWidth
        Severity: Minor
        Found in examples/assets/bootstrap/js/bootstrap.js - About 1 hr to fix

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

          , keydown: function (e) {
          var $this
          , $items
          , $active
          , $parent
          Severity: Minor
          Found in examples/assets/bootstrap/js/bootstrap.js - About 1 hr to fix

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

            $.fn.tooltip = function ( option ) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('tooltip')
            , options = typeof option == 'object' && option
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 4 other locations - About 4 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1457..1465
            examples/assets/bootstrap/js/bootstrap.js on lines 1607..1615
            examples/assets/bootstrap/js/bootstrap.js on lines 2071..2079
            examples/assets/bootstrap/js/bootstrap.js on lines 2178..2186

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

            $.fn.scrollspy = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('scrollspy')
            , options = typeof option == 'object' && option
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 4 other locations - About 4 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1343..1351
            examples/assets/bootstrap/js/bootstrap.js on lines 1457..1465
            examples/assets/bootstrap/js/bootstrap.js on lines 2071..2079
            examples/assets/bootstrap/js/bootstrap.js on lines 2178..2186

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

            $.fn.popover = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('popover')
            , options = typeof option == 'object' && option
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 4 other locations - About 4 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1343..1351
            examples/assets/bootstrap/js/bootstrap.js on lines 1607..1615
            examples/assets/bootstrap/js/bootstrap.js on lines 2071..2079
            examples/assets/bootstrap/js/bootstrap.js on lines 2178..2186

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

            $.fn.typeahead = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('typeahead')
            , options = typeof option == 'object' && option
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 4 other locations - About 4 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1343..1351
            examples/assets/bootstrap/js/bootstrap.js on lines 1457..1465
            examples/assets/bootstrap/js/bootstrap.js on lines 1607..1615
            examples/assets/bootstrap/js/bootstrap.js on lines 2178..2186

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

            $.fn.affix = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('affix')
            , options = typeof option == 'object' && option
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 4 other locations - About 4 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1343..1351
            examples/assets/bootstrap/js/bootstrap.js on lines 1457..1465
            examples/assets/bootstrap/js/bootstrap.js on lines 1607..1615
            examples/assets/bootstrap/js/bootstrap.js on lines 2071..2079

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

            $.fn.dropdown = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('dropdown')
            if (!data) $this.data('dropdown', (data = new Dropdown(this)))
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 127..134

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

            $.fn.alert = function (option) {
            return this.each(function () {
            var $this = $(this)
            , data = $this.data('alert')
            if (!data) $this.data('alert', (data = new Alert(this)))
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 748..755

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

            var $this = $(this)
            , data = $this.data('collapse')
            , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 975..977

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

            var $this = $(this)
            , data = $this.data('modal')
            , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 578..580

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

            $.support.transition && this.$element.hasClass('collapse') ?
            this.$element.one($.support.transition.end, complete) :
            complete()
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 958..960

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

            $.support.transition && this.$element.hasClass('fade')?
            this.$backdrop.one($.support.transition.end, callback) :
            callback()
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 560..562

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

            this.timeout = setTimeout(function() {
            if (self.hoverState == 'out') self.hide()
            }, self.options.delay.hide)
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1113..1115

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

            this.timeout = setTimeout(function() {
            if (self.hoverState == 'in') self.show()
            }, self.options.delay.show)
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1125..1127

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

            this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 45 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1075..1075

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

            this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 45 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1076..1076

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

            , destroy: function () {
            this.hide().$element.off('.' + this.type).removeData(this.type)
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1332..1334

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

            , destroy: function () {
            this.hide().$element.off('.' + this.type).removeData(this.type)
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1446..1448

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

            this.$element
            .on('focus', $.proxy(this.focus, this))
            .on('blur', $.proxy(this.blur, this))
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 280..282

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

            this.options.pause == 'hover' && this.$element
            .on('mouseenter', $.proxy(this.pause, this))
            .on('mouseleave', $.proxy(this.cycle, this))
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1950..1952

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

            , blur: function (e) {
            this.focused = false
            if (!this.mousedover && this.shown) this.hide()
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 2059..2062

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

            , mouseleave: function (e) {
            this.mousedover = false
            if (!this.focused && this.shown) this.hide()
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 2041..2044

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

            $.fn.modal.noConflict = function () {
            $.fn.modal = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            $.fn.collapse.noConflict = function () {
            $.fn.collapse = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            $.fn.button.noConflict = function () {
            $.fn.button = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            $.fn.dropdown.noConflict = function () {
            $.fn.dropdown = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            $.fn.typeahead.noConflict = function () {
            $.fn.typeahead = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769

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

            $.fn.alert.noConflict = function () {
            $.fn.alert = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            $.fn.tab.noConflict = function () {
            $.fn.tab = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 429..432
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            if (!selector) {
            selector = $this.attr('href')
            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 1683..1686

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

            $.fn.carousel.noConflict = function () {
            $.fn.carousel = old
            return this
            }
            Severity: Major
            Found in examples/assets/bootstrap/js/bootstrap.js and 7 other locations - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 141..144
            examples/assets/bootstrap/js/bootstrap.js on lines 236..239
            examples/assets/bootstrap/js/bootstrap.js on lines 595..598
            examples/assets/bootstrap/js/bootstrap.js on lines 762..765
            examples/assets/bootstrap/js/bootstrap.js on lines 995..998
            examples/assets/bootstrap/js/bootstrap.js on lines 1766..1769
            examples/assets/bootstrap/js/bootstrap.js on lines 2094..2097

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

            if (!selector) {
            selector = $this.attr('href')
            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
            }
            Severity: Minor
            Found in examples/assets/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
            examples/assets/bootstrap/js/bootstrap.js on lines 94..97
            Category
            Status