hugoruscitti/pilas

View on GitHub

Showing 1,009 of 1,970 total issues

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

    link: function(originalScope, element, attrs, ngModel) {
      var scope = originalScope.$new(), // create a child scope so we are not polluting original one
          dateFormat,
          closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? originalScope.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection,
          appendToBody = angular.isDefined(attrs.datepickerAppendToBody) ? originalScope.$eval(attrs.datepickerAppendToBody) : datepickerPopupConfig.appendToBody;
Severity: Major
Found in data/asistente/js/ui-bootstrap-tpls.js - About 6 hrs to fix

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

              return function link ( scope, element, attrs ) {
                var tooltip;
                var transitionTimeout;
                var popupTimeout;
                var appendToBody = angular.isDefined( options.appendToBody ) ? options.appendToBody : false;
    Severity: Major
    Found in data/asistente/js/ui-bootstrap-tpls.js - About 6 hrs to fix

      File escena_juego.py has 431 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import pilas
      from random import random
      
      class Juego(pilas.escena.Base):
          "Escena que Controla el juego"
      Severity: Minor
      Found in pilas/ejemplos/ejemplos/minijuegos/tres_en_raya/escena_juego.py - About 6 hrs to fix

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

            link:function (originalScope, element, attrs, modelCtrl) {
        
              //SUPPORTED ATTRIBUTES (OPTIONS)
        
              //minimal no of characters that needs to be entered before typeahead kicks-in
        Severity: Major
        Found in data/asistente/js/ui-bootstrap-tpls.js - About 6 hrs to fix

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

              def setupUi(self, InterpreteWindow):
                  InterpreteWindow.setObjectName(_fromUtf8("InterpreteWindow"))
                  InterpreteWindow.resize(883, 612)
                  InterpreteWindow.setMinimumSize(QtCore.QSize(720, 530))
                  self.centralwidget = QtGui.QWidget(InterpreteWindow)
          Severity: Major
          Found in pilasengine/interprete/interprete_base.py - About 6 hrs to fix

            Function query has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
            Open

              query : function(query) {
                var i;
                var stopwords = ["a","al","algo","algunas","algunos","ante","antes","como","con","contra","cual","cuando","de","del","desde","donde","durante","e","el","ella","ellas","ellos","en","entre","era","erais","eran","eras","eres","es","esa","esas","ese","eso","esos","esta","estaba","estabais","estaban","estabas","estad","estada","estadas","estado","estados","estamos","estando","estar","estaremos","estar\u00e1","estar\u00e1n","estar\u00e1s","estar\u00e9","estar\u00e9is","estar\u00eda","estar\u00edais","estar\u00edamos","estar\u00edan","estar\u00edas","estas","este","estemos","esto","estos","estoy","estuve","estuviera","estuvierais","estuvieran","estuvieras","estuvieron","estuviese","estuvieseis","estuviesen","estuvieses","estuvimos","estuviste","estuvisteis","estuvi\u00e9ramos","estuvi\u00e9semos","estuvo","est\u00e1","est\u00e1bamos","est\u00e1is","est\u00e1n","est\u00e1s","est\u00e9","est\u00e9is","est\u00e9n","est\u00e9s","fue","fuera","fuerais","fueran","fueras","fueron","fuese","fueseis","fuesen","fueses","fui","fuimos","fuiste","fuisteis","fu\u00e9ramos","fu\u00e9semos","ha","habida","habidas","habido","habidos","habiendo","habremos","habr\u00e1","habr\u00e1n","habr\u00e1s","habr\u00e9","habr\u00e9is","habr\u00eda","habr\u00edais","habr\u00edamos","habr\u00edan","habr\u00edas","hab\u00e9is","hab\u00eda","hab\u00edais","hab\u00edamos","hab\u00edan","hab\u00edas","han","has","hasta","hay","haya","hayamos","hayan","hayas","hay\u00e1is","he","hemos","hube","hubiera","hubierais","hubieran","hubieras","hubieron","hubiese","hubieseis","hubiesen","hubieses","hubimos","hubiste","hubisteis","hubi\u00e9ramos","hubi\u00e9semos","hubo","la","las","le","les","lo","los","me","mi","mis","mucho","muchos","muy","m\u00e1s","m\u00ed","m\u00eda","m\u00edas","m\u00edo","m\u00edos","nada","ni","no","nos","nosotras","nosotros","nuestra","nuestras","nuestro","nuestros","o","os","otra","otras","otro","otros","para","pero","poco","por","porque","que","quien","quienes","qu\u00e9","se","sea","seamos","sean","seas","seremos","ser\u00e1","ser\u00e1n","ser\u00e1s","ser\u00e9","ser\u00e9is","ser\u00eda","ser\u00edais","ser\u00edamos","ser\u00edan","ser\u00edas","se\u00e1is","sido","siendo","sin","sobre","sois","somos","son","soy","su","sus","suya","suyas","suyo","suyos","s\u00ed","tambi\u00e9n","tanto","te","tendremos","tendr\u00e1","tendr\u00e1n","tendr\u00e1s","tendr\u00e9","tendr\u00e9is","tendr\u00eda","tendr\u00edais","tendr\u00edamos","tendr\u00edan","tendr\u00edas","tened","tenemos","tenga","tengamos","tengan","tengas","tengo","teng\u00e1is","tenida","tenidas","tenido","tenidos","teniendo","ten\u00e9is","ten\u00eda","ten\u00edais","ten\u00edamos","ten\u00edan","ten\u00edas","ti","tiene","tienen","tienes","todo","todos","tu","tus","tuve","tuviera","tuvierais","tuvieran","tuvieras","tuvieron","tuviese","tuvieseis","tuviesen","tuvieses","tuvimos","tuviste","tuvisteis","tuvi\u00e9ramos","tuvi\u00e9semos","tuvo","tuya","tuyas","tuyo","tuyos","t\u00fa","un","una","uno","unos","vosotras","vosotros","vuestra","vuestras","vuestro","vuestros","y","ya","yo","\u00e9l","\u00e9ramos"];
            
                // stem the searchterms and add them to the correct list
            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 lanas.py has 426 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/lanas.py - About 6 hrs to fix

              Grupo has 43 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Grupo(collections.MutableSequence):
                  """
                  Representa un grupo que puede almacenar actores.
              
                  Los grupos pueden ser útiles para clasificar y organizar
              Severity: Minor
              Found in pilasengine/actores/grupo.py - About 5 hrs to fix

                Function on_key_press has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                Open

                    def on_key_press(self, evento):
                
                        c = self.control
                
                        if self.con_rotacion:
                Severity: Minor
                Found in pilas/habilidades.py - About 5 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 support has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.support = (function() {
                
                    var support,
                        all,
                        a,
                Severity: Major
                Found in data/asistente/js/jquery-1.8.3.js - About 5 hrs to fix

                  File utils.py has 396 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: Minor
                  Found in pilas/utils.py - About 5 hrs to fix

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

                        def setupUi(self, InterpreteWindow):
                            InterpreteWindow.setObjectName(_fromUtf8("InterpreteWindow"))
                            InterpreteWindow.resize(719, 576)
                            InterpreteWindow.setMinimumSize(QtCore.QSize(660, 530))
                            self.centralwidget = QtGui.QWidget(InterpreteWindow)
                    Severity: Major
                    Found in pilas/interprete_base.py - About 5 hrs to fix

                      WidgetConAceleracion has 39 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class WidgetConAceleracion(QGLWidget):
                      
                          """Representa el componente que contiene toda la escena de pilas.
                      
                          Este widget puede contenerse dentro de una ventana de PyQt, o
                      Severity: Minor
                      Found in pilasengine/widget.py - About 5 hrs to fix

                        WidgetSinAceleracion has 39 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class WidgetSinAceleracion(QtGui.QWidget):
                        
                            """Representa el componente que contiene toda la escena de pilas.
                        
                            Este widget puede contenerse dentro de una ventana de PyQt, o
                        Severity: Minor
                        Found in pilasengine/widget.py - 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 data/manual/js/jquery-1.11.1.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 data/api/_static/jquery-1.11.1.js - About 5 hrs to fix

                              Function Callbacks has 127 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 data/asistente/js/jquery-1.8.3.js - About 5 hrs to fix

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

                                    def setupUi(self, Editor):
                                        Editor.setObjectName(_fromUtf8("Editor"))
                                        Editor.resize(529, 452)
                                        Editor.setStyleSheet(_fromUtf8(""))
                                        self.layoutWidget = QtGui.QWidget(Editor)
                                Severity: Major
                                Found in pilasengine/interprete/editor_ui.py - 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 data/manual/js/jquery-1.11.1.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 data/asistente/js/jquery-1.8.3.js - About 5 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language