hugoruscitti/pilas

View on GitHub

Showing 1,009 of 1,970 total issues

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

    domManip: function( args, callback ) {

        // Flatten any nested arrays
        args = concat.apply( [], args );

Severity: Major
Found in data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

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

                    send: function( headers, complete ) {
                        var i,
                            xhr = options.xhr(),
                            id = ++xhrId;
    
    
    Severity: Major
    Found in data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

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

          init = jQuery.fn.init = function( selector, context ) {
              var match, elem;
      
              // HANDLE: $(""), $(null), $(undefined), $(false)
              if ( !selector ) {
      Severity: Major
      Found in data/api/_static/jquery-1.11.1.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 data/manual/js/jquery-1.11.1.js - About 2 hrs to fix

          Function Deferred has 59 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 data/manual/js/jquery-1.11.1.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 data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

              Function Deferred has 59 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 data/api/_static/jquery-1.11.1.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 data/manual/js/jquery-1.11.1.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 data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

                    Boton has 22 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Boton(Actor):
                        """Representa un boton que reacciona al ser presionado.
                    
                        .. image:: images/actores/boton_normal.png
                    
                    
                    Severity: Minor
                    Found in pilas/actores/boton.py - About 2 hrs to fix

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

                          def autocomplete(self, event):
                              if not self.interpreterLocals['pilas'].configuracion.autocompletado_habilitado():
                                  return
                      
                              # Completar comillas y braces
                      Severity: Minor
                      Found in pilasengine/interprete/editorbase/autocomplete.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 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 data/manual/js/jquery-1.11.1.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 data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

                          Boton has 21 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Boton(Actor):
                              """Representa un boton que reacciona al ser presionado.
                          
                              .. image:: ../../pilas/data/manual/imagenes/actores/boton_normal.png
                          
                          
                          Severity: Minor
                          Found in pilasengine/actores/boton.py - About 2 hrs to fix

                            CanvasWidgetAbstracto has 21 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class CanvasWidgetAbstracto(object):
                            
                                def __init__(self, motor, ancho, alto, gestor_escenas, permitir_depuracion,
                                             rendimiento):
                                    QGLWidget.__init__(self, None)
                            Severity: Minor
                            Found in pilas/motores/motor_qt.py - About 2 hrs to fix

                              Function eq has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function eq(a, b, stack) {
                                  // Identical objects are equal. `0 === -0`, but they aren't identical.
                                  // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
                                  if (a === b) return a !== 0 || 1 / a == 1 / b;
                                  // A strict comparison is necessary because `null == undefined`.
                              Severity: Major
                              Found in data/api/_static/underscore-1.3.1.js - About 2 hrs to fix

                                Function link has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      link: function (scope, element, attrs) {
                                
                                        var initialAnimSkip = true;
                                        var currentTransition;
                                
                                
                                Severity: Major
                                Found in data/asistente/js/ui-bootstrap-tpls.js - About 2 hrs to fix

                                  Function displayNextItem has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function displayNextItem() {
                                        // results left, load the summary and display it
                                        if (results.length) {
                                          var item = results.pop();
                                          var listItem = $('<li style="display:none"></li>');
                                  Severity: Major
                                  Found in data/api/_static/searchtools.js - About 2 hrs to fix

                                    Function setupUi has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def setupUi(self, Dialog):
                                            Dialog.setObjectName(_fromUtf8("Dialog"))
                                            Dialog.resize(486, 288)
                                            self.gridLayout_2 = QtGui.QGridLayout(Dialog)
                                            self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
                                    Severity: Major
                                    Found in pilas/lanzador_base.py - About 2 hrs to fix

                                      Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"sphinx-rtd-theme":[function(require,module,exports){
                                      Severity: Minor
                                      Found in data/api/_static/js/theme.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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language