inderpartap/Bunk-O-Meter

View on GitHub

Showing 189 of 189 total issues

File jquery-1.10.2.js has 6641 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.10.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in static/assets/js/jquery-1.10.2.js - About 2 wks to fix

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

    /*!
     * Bootstrap v3.3.7 (http://getbootstrap.com)
     * Copyright 2011-2016 Twitter, Inc.
     * Licensed under the MIT license
     */
    Severity: Major
    Found in static/js/bootstrap.js - About 4 days to fix

      File captcha.js has 707 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var keys = {
          "0": [
              ["0", "0", "0", "1", "1", "1", "1", "0", "0", "0"],
              ["0", "1", "1", "1", "1", "1", "1", "1", "1", "0"],
              ["0", "1", "1", "1", "0", "0", "0", "1", "1", "0"],
      Severity: Major
      Found in captcha.js - About 1 day to fix

        Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ajax: function( url, options ) {
        
                // If url is an object, simulate pre-1.5 signature
                if ( typeof url === "object" ) {
                    options = url;
        Severity: Major
        Found in static/assets/js/jquery-1.10.2.js - About 1 day to fix

          Function setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          setDocument = Sizzle.setDocument = function( node ) {
              var doc = node ? node.ownerDocument || node : preferredDoc,
                  parent = doc.defaultView;
          
              // If no document and documentElement is available, return
          Severity: Major
          Found in static/assets/js/jquery-1.10.2.js - About 1 day to fix

            File colorchange.js has 444 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            timeTableStorage = [{
                "id": 0,
                "name": "Table Default",
                "data": [],
            }];
            Severity: Minor
            Found in static/timetable/js/colorchange.js - About 6 hrs to fix

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

                    init: function () {
                      return this.each(function () {
                          var $element = $(this)
                            , $div
                            , $switchLeft
              Severity: Major
              Found in static/assets/js/bootstrap-checkbox-radio-switch.js - About 5 hrs to fix

                Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.Callbacks = function( options ) {
                
                    // Convert options from String-formatted to Object-formatted if needed
                    // (we check in cache first)
                    options = typeof options === "string" ?
                Severity: Major
                Found in static/assets/js/jquery-1.10.2.js - About 5 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if ( event.pageX == null && original.clientX != null ) {
                                  eventDoc = event.target.ownerDocument || document;
                                  doc = eventDoc.documentElement;
                                  body = eventDoc.body;
                  
                  
                  Severity: Critical
                  Found in static/assets/js/jquery-1.10.2.js - About 5 hrs to fix

                    Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.support = (function( support ) {
                    
                        var all, a, input, select, fragment, opt, eventName, isSupported, i,
                            div = document.createElement("div");
                    
                    
                    Severity: Major
                    Found in static/assets/js/jquery-1.10.2.js - About 4 hrs to fix

                      File bootstrap-checkbox-radio-switch.js has 357 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      !function ($) {
                      
                       /* CHECKBOX PUBLIC CLASS DEFINITION
                        * ============================== */
                      
                      
                      Severity: Minor
                      Found in static/assets/js/bootstrap-checkbox-radio-switch.js - About 4 hrs to fix

                        Function getCaptcha has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var getCaptcha = function(img) {
                        
                            temp = 0;
                            var x, y;
                            for (x = 0; x < 25; ++x) {
                        Severity: Minor
                        Found in captcha.js - About 4 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

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

                        /*
                            
                            
                        
                             Creative Tim Modifications
                        Severity: Minor
                        Found in static/assets/js/bootstrap-notify.js - About 4 hrs to fix

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

                          !function($) {
                              var Selectpicker = function(element, options, e) {
                                  if (e ) {
                                      e.stopPropagation();
                                      e.preventDefault();
                          Severity: Minor
                          Found in static/assets/js/bootstrap-select.js - About 4 hrs to fix

                            Function defaultPrefilter has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function defaultPrefilter( elem, props, opts ) {
                                /* jshint validthis: true */
                                var prop, value, toggle, tween, hooks, oldfire,
                                    anim = this,
                                    orig = {},
                            Severity: Major
                            Found in static/assets/js/jquery-1.10.2.js - About 3 hrs to fix

                              Cyclomatic complexity is too high in function parseatt. (17)
                              Open

                              def parseatt(user):
                                  page = open(user)
                                  soup =  BeautifulSoup(page, "html.parser")
                                  page.close()
                                  #print(soup.prettify())
                              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 trigger has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  trigger: function( event, data, elem, onlyHandlers ) {
                                      var handle, ontype, cur,
                                          bubbleType, special, tmp, i,
                                          eventPath = [ elem || document ],
                                          type = core_hasOwn.call( event, "type" ) ? event.type : event,
                              Severity: Major
                              Found in static/assets/js/jquery-1.10.2.js - About 3 hrs to fix

                                Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function Animation( elem, properties, options ) {
                                    var result,
                                        stopped,
                                        index = 0,
                                        length = animationPrefilters.length,
                                Severity: Major
                                Found in static/assets/js/jquery-1.10.2.js - About 3 hrs to fix

                                  Function send has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                  send: function( headers, complete ) {
                                  
                                                      // Get a new xhr
                                                      var handle, i,
                                                          xhr = s.xhr();
                                  Severity: Major
                                  Found in static/assets/js/jquery-1.10.2.js - About 3 hrs to fix

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

                                            init: function (e) {
                                                var _this = this;
                                                this.$element.hide();
                                                this.multiple = this.$element.prop('multiple');
                                    
                                    
                                    Severity: Major
                                    Found in static/assets/js/bootstrap-select.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language