inderpartap/Bunk-O-Meter

View on GitHub

Showing 189 of 189 total issues

Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Sizzle( selector, context, results, seed ) {
    var match, elem, m, nodeType,
        // QSA vars
        i, groups, old, nid, newContext, newSelector;

Severity: Major
Found in static/assets/js/jquery-1.10.2.js - About 3 hrs to fix

    Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        buildFragment: function( elems, context, scripts, selection ) {
            var j, elem, contains,
                tmp, tag, tbody, wrap,
                l = elems.length,
    
    
    Severity: Major
    Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

      Function initAutocomplete has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function initAutocomplete(allData, uniqueData) {
          unique_courses = uniqueData;
          all_data = allData;
          // autocomplete options
          var courseCodeOption = {
      Severity: Major
      Found in static/timetable/js/autocomplete_course.js - About 2 hrs to fix

        Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            add: function( elem, types, handler, data, selector ) {
                var tmp, events, t, handleObjIn,
                    special, eventHandle, handleObj,
                    handlers, type, namespaces, origType,
                    elemData = jQuery._data( elem );
        Severity: Major
        Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

          Function matcherFromGroupMatchers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
              // A counter to specify which element is currently being matched
              var matcherCachedRuns = 0,
                  bySet = setMatchers.length > 0,
                  byElement = elementMatchers.length > 0,
          Severity: Major
          Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

            Cyclomatic complexity is too high in function parsehistory. (12)
            Open

            def parsehistory(user):
                page = open(user)
                soup =  BeautifulSoup(page, "html.parser")
                page.close()
                c=0
            Severity: Minor
            Found in parse.py by radon

            Cyclomatic Complexity

            Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

            Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

            Construct Effect on CC Reasoning
            if +1 An if statement is a single decision.
            elif +1 The elif statement adds another decision.
            else +0 The else statement does not cause a new decision. The decision is at the if.
            for +1 There is a decision at the start of the loop.
            while +1 There is a decision at the while statement.
            except +1 Each except branch adds a new conditional path of execution.
            finally +0 The finally block is unconditionally executed.
            with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
            assert +1 The assert statement internally roughly equals a conditional statement.
            Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
            Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

            Source: http://radon.readthedocs.org/en/latest/intro.html

            Function parseatt has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

            def parseatt(user):
                page = open(user)
                soup =  BeautifulSoup(page, "html.parser")
                page.close()
                #print(soup.prettify())
            Severity: Minor
            Found in parse.py - About 2 hrs 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 done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function done( status, nativeStatusText, responses, headers ) {
                        var isSuccess, success, error, response, modified,
                            statusText = nativeStatusText;
            
                        // Called once
            Severity: Major
            Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

              Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                  if ( postFilter && !postFilter[ expando ] ) {
                      postFilter = setMatcher( postFilter );
                  }
                  if ( postFinder && !postFinder[ expando ] ) {
              Severity: Major
              Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                Function superMatcher has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        superMatcher = function( seed, context, xml, results, expandContext ) {
                            var elem, j, matcher,
                                setMatched = [],
                                matchedCount = 0,
                                i = "0",
                Severity: Major
                Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                  Function attendance has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  def attendance(username,password):
                  #    display = Display(visible=0, size=(800, 600))
                  #    display.start()
                  
                      baseurl = "http://academicscc.vit.ac.in/student/stud_login.asp"
                  Severity: Major
                  Found in main.py - About 2 hrs to fix

                    Function init has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            init: function () {
                                var self = this;
                    
                                this.buildNotify();
                                if (this.settings.content.icon) {
                    Severity: Major
                    Found in static/assets/js/bootstrap-notify.js - About 2 hrs to fix

                      Function Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          Deferred: function( func ) {
                              var tuples = [
                                      // action, add listener, listener list, final state
                                      [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                      [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                      Severity: Major
                      Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                        Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                "CHILD": function( type, what, argument, first, last ) {
                                    var simple = type.slice( 0, 3 ) !== "nth",
                                        forward = type.slice( -4 ) !== "last",
                                        ofType = what === "of-type";
                        
                        
                        Severity: Major
                        Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                          Function initRightMenu has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              initRightMenu: function(){
                                   if(!navbar_initialized){
                                      $navbar = $('nav').find('.navbar-collapse').first().clone(true);
                          
                                      $sidebar = $('.sidebar');
                          Severity: Major
                          Found in static/assets/js/light-bootstrap-dashboard.js - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                                    if ( forward && useCache ) {
                                                        // Seek `elem` from a previously-cached index
                                                        outerCache = parent[ expando ] || (parent[ expando ] = {});
                                                        cache = outerCache[ type ] || [];
                                                        nodeIndex = cache[0] === dirruns && cache[1];
                            Severity: Critical
                            Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                              Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  init: function( selector, context, rootjQuery ) {
                                      var match, elem;
                              
                                      // HANDLE: $(""), $(null), $(undefined), $(false)
                                      if ( !selector ) {
                              Severity: Major
                              Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                                Function matchImg has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function matchImg(rx, ry, pix, mask) {
                                    flag = 1;
                                    breakflag = 0;
                                    x = 0;
                                    y = 0;
                                Severity: Minor
                                Found in captcha.js - About 2 hrs 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 domManip has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    domManip: function( args, callback, allowIntersection ) {
                                
                                        // Flatten any nested arrays
                                        args = core_concat.apply( [], args );
                                
                                
                                Severity: Major
                                Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix

                                  Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function ajaxConvert( s, response, jqXHR, isSuccess ) {
                                      var conv2, current, conv, tmp, prev,
                                          converters = {},
                                          // Work with a copy of dataTypes in case we need to modify it for conversion
                                          dataTypes = s.dataTypes.slice();
                                  Severity: Major
                                  Found in static/assets/js/jquery-1.10.2.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language