ciudadanointeligente/partidopublico

View on GitHub

Showing 182 of 182 total issues

File angular_app.js has 737 lines of code (exceeds 250 allowed). Consider refactoring.
Open

function scroll_to_top() {
    $('html, body').animate({
        scrollTop: $('#container').offset().top
    }, 500);
}
Severity: Major
Found in app/assets/javascripts/angular/angular_app.js - About 1 day to fix

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas7Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosGastosCampanaAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 782..812

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas6Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosIngresosCampanaAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas3Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosBalanceAnualAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 782..812
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas2Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosEgresosOrdinariosAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 782..812
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas4Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosContratacioneAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 782..812
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas5Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosTransferenciasAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 607..637
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 782..812
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    function finanzas1Controller($scope,$http,$location,$aside,$attrs){
    
      $scope.partido_id = $location.path().split("/")[2];
    
      function getDatosIngresosOrdinariosAgregadosByPartido(partido_id) {
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 642..672
    app/assets/javascripts/angular/angular_app.js on lines 677..707
    app/assets/javascripts/angular/angular_app.js on lines 712..742
    app/assets/javascripts/angular/angular_app.js on lines 747..777
    app/assets/javascripts/angular/angular_app.js on lines 782..812
    app/assets/javascripts/angular/angular_app.js on lines 817..847

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 288.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      var save_or_update_cargo = function() {
        if($scope.cargo.id) {
          $http.put('/cargos/'+$scope.cargo.id, $scope.cargo)
            .success(function(data){
              getCargosByPartido($scope.partido_id);
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 291..312
    app/assets/javascripts/angular/angular_app.js on lines 404..425

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 215.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      var save_or_update_actividad_publica = function() {
        if($scope.actividad_publica.id) {
          $http.put('/actividad_publicas/'+$scope.actividad_publica.id, $scope.actividad_publica)
            .success(function(data){
              getActividadesPublicassByPartido($scope.partido_id);
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 119..140
    app/assets/javascripts/angular/angular_app.js on lines 291..312

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 215.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      var save_or_update_sede = function() {
        if($scope.sede.id) {
          $http.put('/sedes/'+$scope.sede.id, $scope.sede)
            .success(function(data){
              getSedesByPartido($scope.partido_id);
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
    app/assets/javascripts/angular/angular_app.js on lines 119..140
    app/assets/javascripts/angular/angular_app.js on lines 404..425

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 215.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File partidos_controller.rb has 497 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class PartidosController < ApplicationController
      before_action :authenticate_admin!, only: [:new, :edit, :create, :update, :destroy, :admin]
      before_filter :authenticate_superadmin, only: [:new, :edit, :create, :update, :destroy]
      before_action :set_partido, except: [:index, :new, :create, :admin]
      before_action :get_partidos, except: [:index, :new, :create, :admin]
    Severity: Minor
    Found in app/controllers/partidos_controller.rb - About 7 hrs to fix

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        $scope.getCargoModal = function(cargo_id){
          if(cargo_id) {
            getCargoInfo(cargo_id);
      
          } else {
      Severity: Major
      Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
      app/assets/javascripts/angular/angular_app.js on lines 447..473
      app/assets/javascripts/angular/angular_app.js on lines 564..590

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 185.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        $scope.getActividadPublicaModal = function(actividad_publica_id){
          if(actividad_publica_id) {
            getActividadPublicaInfo(actividad_publica_id);
          } else {
            $scope.actividad_publica = {
      Severity: Major
      Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
      app/assets/javascripts/angular/angular_app.js on lines 239..266
      app/assets/javascripts/angular/angular_app.js on lines 564..590

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 185.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        $scope.getTipoCargoModal = function(tipo_cargo_id){
          if(tipo_cargo_id) {
            getTipoCargoInfo(tipo_cargo_id);
          } else {
            $scope.tipo_cargo = {
      Severity: Major
      Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
      app/assets/javascripts/angular/angular_app.js on lines 239..266
      app/assets/javascripts/angular/angular_app.js on lines 447..473

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 185.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        Raphael.fn.ingreso_ord_header = function(){
          var paper = this;
          paper.circle(12, 15, 9 )
          .attr({
            "fill" : "#23DBB8",
      Severity: Major
      Found in app/assets/javascripts/raphael_compare.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/raphael_compare.js on lines 8..35

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 165.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        Raphael.fn.afiliados_compare_header = function(){
          var paper = this;
          paper.circle(12, 15, 9 )
          .attr({
            "fill" : "#23DBB8",
      Severity: Major
      Found in app/assets/javascripts/raphael_compare.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/raphael_compare.js on lines 194..221

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 165.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        Raphael.fn.ingreso_ord_front_header = function(){
      
          var paper = this;
      
          paper.circle(12, 15, 9 )
      Severity: Major
      Found in app/assets/javascripts/raphael_frontend.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/raphael_frontend.js on lines 215..245

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 165.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        Raphael.fn.egreso_ord_front_header = function(){
      
          var paper = this;
      
          paper.circle(12, 15, 9 )
      Severity: Major
      Found in app/assets/javascripts/raphael_frontend.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/raphael_frontend.js on lines 136..166

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 165.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      function cargosController($scope,$http,$location,$aside,$attrs){
        $scope.cargos = [];
        $scope.personas = [];
        $scope.partido_id = $location.path().split("/")[2];
        $scope.pageSize = 5;
      Severity: Major
      Found in app/assets/javascripts/angular/angular_app.js - About 6 hrs to fix
        Severity
        Category
        Status
        Source
        Language