inderpartap/Bunk-O-Meter

View on GitHub

Showing 189 of 189 total issues

Function checkPosition has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Affix.prototype.checkPosition = function () {
    if (!this.$element.is(':visible')) return

    var height       = this.$element.height()
    var offset       = this.options.offset
Severity: Minor
Found in static/js/bootstrap.js - About 1 hr to fix

    Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        fix: function( event ) {
            if ( event[ jQuery.expando ] ) {
                return event;
            }
    
    
    Severity: Minor
    Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

      Function selectpicker has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.selectpicker = function(option, event) {
             //get the args of the outer function..
             var args = arguments;
             var value;
             var chain = this.each(function () {
      Severity: Minor
      Found in static/assets/js/bootstrap-select.js - About 1 hr to fix

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

        function propFilter( props, specialEasing ) {
            var index, name, easing, value, hooks;
        
            // camelCase, specialEasing and expand cssHook pass
            for ( index in props ) {
        Severity: Minor
        Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

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

                  setup: function() {
          
                      if ( rformElems.test( this.nodeName ) ) {
                          // IE doesn't fire change on a check/radio until blur; trigger it on click
                          // after a propertychange. Eat the blur-change in special.change.handle.
          Severity: Minor
          Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

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

              Collapse.prototype.hide = function () {
                if (this.transitioning || !this.$element.hasClass('in')) return
            
                var startEvent = $.Event('hide.bs.collapse')
                this.$element.trigger(startEvent)
            Severity: Minor
            Found in static/js/bootstrap.js - About 1 hr to fix

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

                  function next() {
                    $active
                      .removeClass('active')
                      .find('> .dropdown-menu > .active')
                        .removeClass('active')
              Severity: Minor
              Found in static/js/bootstrap.js - About 1 hr to fix

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

                jQuery.fn.offset = function( options ) {
                    if ( arguments.length ) {
                        return options === undefined ?
                            this :
                            this.each(function( i ) {
                Severity: Minor
                Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

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

                          "*": [function( prop, value ) {
                              var tween = this.createTween( prop, value ),
                                  target = tween.cur(),
                                  parts = rfxnum.exec( value ),
                                  unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
                  Severity: Minor
                  Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

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

                        off: function( types, selector, fn ) {
                            var handleObj, type;
                            if ( types && types.preventDefault && types.handleObj ) {
                                // ( event )  dispatched jQuery.Event
                                handleObj = types.handleObj;
                    Severity: Minor
                    Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

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

                        ScrollSpy.prototype.refresh = function () {
                          var that          = this
                          var offsetMethod  = 'offset'
                          var offsetBase    = 0
                      
                      
                      Severity: Minor
                      Found in static/js/bootstrap.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                        if ( jQuery.expr && jQuery.expr.filters ) {
                            jQuery.expr.filters.hidden = function( elem ) {
                                // Support: Opera <= 12.12
                                // Opera reports offsetWidths and offsetHeights less than zero on some elements
                                return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
                        Severity: Major
                        Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                              support.getById && context.nodeType === 9 && documentIsHTML &&
                                              Expr.relative[ tokens[1].type ] ) {
                          
                                          context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                          Severity: Major
                          Found in static/assets/js/jquery-1.10.2.js - About 1 hr to fix

                            Function insertCourseToCourseListTable has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function insertCourseToCourseListTable(courseId, courseCode, courseTile, faculty, slotArray, venue, credits, isProject) {
                            Severity: Major
                            Found in static/timetable/js/colorchange.js - About 1 hr to fix

                              Function parsehistory has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def parsehistory(user):
                                  page = open(user)
                                  soup =  BeautifulSoup(page, "html.parser")
                                  page.close()
                                  c=0
                              Severity: Minor
                              Found in parse.py - About 55 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

                              Function getSlotSelectionButton has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              function getSlotSelectionButton(code, title, type, slot, faculty, credits, venue) {
                              Severity: Major
                              Found in static/timetable/js/autocomplete_course.js - About 50 mins to fix

                                Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                Severity: Major
                                Found in static/assets/js/jquery-1.10.2.js - About 50 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if ( (seed = find(
                                                          token.matches[0].replace( runescape, funescape ),
                                                          rsibling.test( tokens[0].type ) && context.parentNode || context
                                                      )) ) {
                                  
                                  
                                  Severity: Major
                                  Found in static/assets/js/jquery-1.10.2.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (matchImg(x, y, img, mask)) {
                                                            skipstart.push(y);
                                                            skipend.push(y + mask[0].length);
                                                            sorter.push(y);
                                                            captcha.push(order[l]);
                                    Severity: Major
                                    Found in captcha.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if ( (event.result = ret) === false ) {
                                                                  event.preventDefault();
                                                                  event.stopPropagation();
                                                              }
                                      Severity: Major
                                      Found in static/assets/js/jquery-1.10.2.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language