ciudadanointeligente/partidopublico

View on GitHub

Showing 59 of 182 total issues

Function finanzas2Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function finanzas2Controller($scope,$http,$location,$aside,$attrs){
Severity: Minor
Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

    Function finanzas3Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function finanzas3Controller($scope,$http,$location,$aside,$attrs){
    Severity: Minor
    Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

      Function actividad_publicasController has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function actividad_publicasController($scope,$http,$location,$aside,$attrs){
      Severity: Minor
      Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

        Function finanzas1Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function finanzas1Controller($scope,$http,$location,$aside,$attrs){
        Severity: Minor
        Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

          Function afiliacionsController has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function afiliacionsController($scope,$http,$location,$aside,$attrs){
          Severity: Minor
          Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

            Function cargosController has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function cargosController($scope,$http,$location,$aside,$attrs){
            Severity: Minor
            Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

              Function finanzas7Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function finanzas7Controller($scope,$http,$location,$aside,$attrs){
              Severity: Minor
              Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                Function finanzas6Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function finanzas6Controller($scope,$http,$location,$aside,$attrs){
                Severity: Minor
                Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                  Function finanzas4Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function finanzas4Controller($scope,$http,$location,$aside,$attrs){
                  Severity: Minor
                  Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                    Function tipoCargosController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function tipoCargosController($scope,$http,$location,$aside,$attrs){
                    Severity: Minor
                    Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                      Function sedesController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function sedesController($scope,$http,$location,$aside,$attrs){
                      Severity: Minor
                      Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                        Function finanzas5Controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function finanzas5Controller($scope,$http,$location,$aside,$attrs){
                        Severity: Minor
                        Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                          Method regiones has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def regiones
                              rangos = [[14,17],[18,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,59],[60,64],[65,69],[70,100]]
                              @datos_region = []
                              @datos_nacional = []
                              @rangos_edad = []
                          Severity: Minor
                          Found in app/controllers/partidos_controller.rb - About 35 mins 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

                          Method publicacion_candidatos has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def publicacion_candidatos
                              @publicacion_candidatos = []
                              tc_candidatos = @partido.tipo_cargos.where(candidato:true)
                              tc_candidatos.each do |tc|
                                filter_by = @partido.cargos.where(tipo_cargo_id:tc)
                          Severity: Minor
                          Found in app/controllers/partidos_controller.rb - About 35 mins 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

                          Method representantes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def representantes
                              @representantes = []
                              t_cargos = @partido.tipo_cargos.where(representante: true)
                              by_gender = []
                              t_cargos.each do |tc|
                          Severity: Minor
                          Found in app/controllers/partidos_controller.rb - About 35 mins 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

                          Method autoridades has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def autoridades
                              @autoridades = []
                              t_cargos = @partido.tipo_cargos.where(autoridad: true)
                              t_cargos.each do |tc|
                                cargos = @partido.cargos.where(tipo_cargo_id: tc)
                          Severity: Minor
                          Found in app/controllers/partidos_controller.rb - About 35 mins 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 personasController has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function personasController($scope,$http,$location,$aside,$attrs){
                            $scope.persona = {};
                            $scope.personas = [];
                            $scope.partido_id = $location.path().split("/")[2];
                            $scope.pageSize = 5;
                          Severity: Minor
                          Found in app/assets/javascripts/angular/angular_app.js - About 35 mins 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

                          Method set_comparison_params has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def set_comparison_params
                                @partido_ids = params[:partido_ids].nil? ? Partido.ids : params[:partido_ids]
                                @category = params[:category].nil? ? 'category_1' : params[:category]
                                @fecha_param = params[:fecha_datos].blank? ? nil : Date.new(params[:fecha_datos].split("-")[0].to_i, params[:fecha_datos].split("-")[1].to_i, params[:fecha_datos].split("-")[2].to_i)
                              end
                          Severity: Minor
                          Found in app/controllers/comparisons_controller.rb - About 25 mins 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 actividad_publicasController has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function actividad_publicasController($scope,$http,$location,$aside,$attrs){
                            $scope.actividad_publicas = [];
                            $scope.partido_id = $location.path().split("/")[2];
                          
                            var save_or_update_actividad_publica = function() {
                          Severity: Minor
                          Found in app/assets/javascripts/angular/angular_app.js - About 25 mins 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