hugoruscitti/pilas

View on GitHub

Showing 1,009 of 1,970 total issues

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 data/api/_static/jquery-1.11.1.js - About 1 day to fix

    File pytweener.py has 560 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # pyTweener
    #
    # Tweening functions for python
    #
    # Heavily based on caurina Tweener: http://code.google.com/p/tweener/
    Severity: Major
    Found in pilas/pytweener.py - About 1 day to fix

      File habilidades.py has 549 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- encoding: utf-8 -*-
      # Pilas engine - A video game framework.
      #
      # Copyright 2010 - Hugo Ruscitti
      # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
      Severity: Major
      Found in pilas/habilidades.py - About 1 day to fix

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

        setDocument = Sizzle.setDocument = function( node ) {
            var hasCompare,
                doc = node ? node.ownerDocument || node : preferredDoc,
                parent = doc.defaultView;
        
        
        Severity: Major
        Found in data/manual/js/jquery-1.11.1.js - About 1 day to fix

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

          setDocument = Sizzle.setDocument = function( node ) {
              var hasCompare,
                  doc = node ? node.ownerDocument || node : preferredDoc,
                  parent = doc.defaultView;
          
          
          Severity: Major
          Found in data/api/_static/jquery-1.11.1.js - About 1 day to fix

            File actor.py has 522 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # -*- encoding: utf-8 -*-
            # Pilas engine - A video game framework.
            #
            # Copyright 2010 - Hugo Ruscitti
            # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
            Severity: Major
            Found in pilas/actores/actor.py - About 1 day to fix

              File widget.py has 520 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- encoding: utf-8 -*-
              # pilas engine: un motor para hacer videojuegos
              #
              # Copyright 2010-2014 - Hugo Ruscitti
              # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
              Severity: Major
              Found in pilasengine/widget.py - About 1 day to fix

                File __init__.py has 501 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # -*- encoding: utf-8 -*-
                # pilas engine: un motor para hacer videojuegos
                #
                # Copyright 2010-2014 - Hugo Ruscitti
                # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
                Severity: Major
                Found in pilasengine/__init__.py - About 1 day to fix

                  Function analizar_ganador has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def analizar_ganador(self):
                          
                          self.posicion_texto = [0, -180]
                          
                          ## gano player 1
                  Severity: Minor
                  Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.py - About 7 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

                  Pilas has 55 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Pilas(object):
                      """Representa el area de juego de pilas, el componente principal.
                  
                      El objeto pilas se inicializa cuando llamamos a la función
                      ``pilasengine.iniciar()``. El objeto que se retorna es un
                  Severity: Major
                  Found in pilasengine/__init__.py - About 7 hrs to fix

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

                      this.$get = [ '$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $parse, $document, $position, $interpolate ) {
                        return function $tooltip ( type, prefix, defaultTriggerShow ) {
                          var options = angular.extend( {}, defaultOptions, globalOptions );
                    
                          /**
                    Severity: Major
                    Found in data/asistente/js/ui-bootstrap-tpls.js - About 7 hrs to fix

                      Function $tooltip has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          return function $tooltip ( type, prefix, defaultTriggerShow ) {
                            var options = angular.extend( {}, defaultOptions, globalOptions );
                      
                            /**
                             * Returns an object of show and hide triggers.
                      Severity: Major
                      Found in data/asistente/js/ui-bootstrap-tpls.js - About 7 hrs to fix

                        Function $RouteProvider has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function $RouteProvider(){
                          function inherit(parent, extra) {
                            return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
                          }
                        
                        
                        Severity: Major
                        Found in data/asistente/js/angular-route.js - About 7 hrs to fix

                          File editor.py has 469 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # -*- encoding: utf-8 -*-
                          # pilas engine: un motor para hacer videojuegos
                          #
                          # Copyright 2010-2014 - Hugo Ruscitti
                          # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
                          Severity: Minor
                          Found in pilasengine/interprete/editor.py - About 7 hrs to fix

                            Function _verificar_colisiones_fisicas_en_tupla has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def _verificar_colisiones_fisicas_en_tupla(self, tupla, id_actor_a, id_actor_b):
                                    "Toma dos grupos de actores y analiza colisiones entre ellos."
                                    (grupo_a, grupo_b, funcion_a_llamar) = tupla
                            
                                    for a in grupo_a:
                            Severity: Minor
                            Found in pilas/colisiones.py - About 7 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 performAnimation has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
                                    var currentClassName, classes, node = extractElementNode(element);
                                    if(node) {
                                      currentClassName = node.className;
                                      classes = currentClassName + ' ' + className;
                            Severity: Major
                            Found in data/asistente/js/angular-animate.js - About 7 hrs to fix

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

                                  link: function(scope, element, attrs, ngModel) {
                                    if ( !ngModel ) {
                                      return; // do nothing if no ng-model
                                    }
                              
                              
                              Severity: Major
                              Found in data/asistente/js/ui-bootstrap-tpls.js - About 6 hrs to fix

                                Function performObjectSearch has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  performObjectSearch : function(object, otherterms) {
                                    var filenames = this._index.filenames;
                                    var objects = this._index.objects;
                                    var objnames = this._index.objnames;
                                    var titles = this._index.titles;
                                Severity: Minor
                                Found in data/api/_static/searchtools.js - About 6 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 appdirs.py has 445 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                #!/usr/bin/env python
                                # -*- coding: utf-8 -*-
                                # Copyright (c) 2005-2010 ActiveState Software Inc.
                                # Copyright (c) 2013 Eddy Petrișor
                                
                                
                                Severity: Minor
                                Found in pilasengine/datos/appdirs.py - About 6 hrs to fix

                                  Function compile has 164 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          compile: function (tElem, tAttrs) {
                                            var tooltipLinker = $compile( template );
                                  
                                            return function link ( scope, element, attrs ) {
                                              var tooltip;
                                  Severity: Major
                                  Found in data/asistente/js/ui-bootstrap-tpls.js - About 6 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language