hugoruscitti/pilas

View on GitHub

Showing 1,009 of 1,970 total issues

Function removeClass has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    removeClass: function( value ) {
        var classes, elem, cur, clazz, j, finalValue,
            i = 0,
            len = this.length,
            proceed = arguments.length === 0 || typeof value === "string" && value;
Severity: Minor
Found in data/api/_static/jquery-1.11.1.js - About 1 hr to fix

    Function load has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.fn.load = function( url, params, callback ) {
        if ( typeof url !== "string" && _load ) {
            return _load.apply( this, arguments );
        }
    
    
    Severity: Minor
    Found in data/api/_static/jquery-1.11.1.js - About 1 hr to fix

      Function fixCloneNodeIssues has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function fixCloneNodeIssues( src, dest ) {
          var nodeName, e, data;
      
          // We do not need to do anything for non-Elements
          if ( dest.nodeType !== 1 ) {
      Severity: Minor
      Found in data/api/_static/jquery-1.11.1.js - About 1 hr to fix

        Function _initUI has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def _initUI(self):
        
                self.setWindowTitle('Pilas Log')
        
                self.setWindowIcon(QtGui.QIcon(self._ruta_icono('tux.png')))
        Severity: Minor
        Found in pilas/widget_log.py - About 1 hr to fix

          Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, pilas, texto="", x=0, y=0, dialogo=None,
          Severity: Major
          Found in pilasengine/actores/globo.py - About 1 hr to fix

            Function add_tween has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                def add_tween(self, obj, inicial=None, **kwargs):
                    """Returns Tween object or False
            
                       Example::
            
            
            Severity: Minor
            Found in pilasengine/utils/pitweener.py - About 1 hr 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 Circulo has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def Circulo(self, x=0, y=0, radio=20, dinamica=True, densidad=1.0,
            Severity: Major
            Found in pilasengine/fisica/__init__.py - About 1 hr to fix

              Function actualizar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  def actualizar(self):
                      velocidad = 10
                      salto = 15
                      self.x = self.figura.x
                      self.y = self.figura.y
              Severity: Minor
              Found in pilasengine/ejemplos/plataformas_con_disparos.py - About 1 hr 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 cuando_pulsa_tecla has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  def cuando_pulsa_tecla(self, codigo_tecla, texto_tecla):
                      if codigo_tecla == 'F2':
                          pilas.mundo.motor.capturar_pantalla("captura_pantalla.png")
                      elif codigo_tecla == 'F5':
                          self._alternar_modo(ModoWidgetLog)
              Severity: Minor
              Found in pilas/depurador.py - About 1 hr 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 iniciar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

              def iniciar(ancho=640, alto=480, titulo='Pilas', usar_motor='qtgl',
                          rendimiento=60, modo=None, area_fisica=None, gravedad=(0, -90), pantalla_completa=False,
                          permitir_depuracion=True, audio=None, centrado=True):
                  """
                  Inicia la ventana principal del juego con algunos detalles de funcionamiento.
              Severity: Minor
              Found in pilas/__init__.py - About 1 hr 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 addTween has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  def addTween(self, obj, **kwargs):
                      """ addTween( object, **kwargs) -> tweenObject or False
               
                          Example:
                          tweener.addTween( myRocket, throttle=50, setThrust=400, tweenTime=5.0, tweenType=tweener.OUT_QUAD )
              Severity: Minor
              Found in pilas/pytweener.py - About 1 hr 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 __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, x, y, radio, dinamica=True, densidad=1.0,
              Severity: Major
              Found in pilas/fisica.py - About 1 hr to fix

                Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, x, y, puntos, dinamica=True, densidad=1.0,
                Severity: Major
                Found in pilas/fisica.py - About 1 hr to fix

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

                          text.get = function (url, callback, errback, headers) {
                              var xhr = text.createXhr(), header;
                              xhr.open('GET', url, true);
                  
                              //Allow plugins direct access to xhr headers
                  Severity: Minor
                  Found in data/manual/mkdocs/js/text.js - About 1 hr to fix

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

                      var $transition = function(element, trigger, options) {
                        options = options || {};
                        var deferred = $q.defer();
                        var endEventName = $transition[options.animation ? "animationEndEventName" : "transitionEndEventName"];
                    
                    
                    Severity: Minor
                    Found in data/asistente/js/ui-bootstrap-tpls.js - About 1 hr to fix

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

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

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

                        function cloneFixAttributes( src, dest ) {
                            var nodeName;
                        
                            // We do not need to do anything for non-Elements
                            if ( dest.nodeType !== 1 ) {
                        Severity: Minor
                        Found in data/asistente/js/jquery-1.8.3.js - About 1 hr to fix

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

                              spin: function(target) {
                                this.stop()
                          
                                var self = this
                                  , o = self.opts
                          Severity: Minor
                          Found in data/asistente/js/spin.js - About 1 hr to fix

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

                                style: function( elem, name, value, extra ) {
                                    // Don't set styles on text and comment nodes
                                    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                        return;
                                    }
                            Severity: Minor
                            Found in data/asistente/js/jquery-1.8.3.js - About 1 hr to fix

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

                                  nav.init = function ($) {
                                      var doc = $(document),
                                          self = this;
                              
                                      this.navBar = $('div.wy-side-scroll:first');
                              Severity: Minor
                              Found in data/api/_static/js/theme.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language