QuantoVale/QuantoValePlay

View on GitHub

Showing 5 of 513 total issues

File seeds.rb has 505 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Contrato.create!([
  {identificadorContrato: nil, uasg: "380931", modalidadeLicitacao: "5", codigoContrato: "50", licitacaoAssociada: "38093105000232013", objeto: "Prestação de Serviços de Vigilância Des armada para atender a sede da SRTE/AL e suas un idades Descentralizadas.", numeroAditivos: 0, numeroProcessos: 46201006411201376, CPFContratada: "11179264000766", dataAssinatura: "2014-03-10", fundamentoGeral: nil, dataInicioVigencia: "2014-03-18", dataTerminoVigencia: "2015-03-17", valorInicial: "481514.0", aditivosContratos: nil, eventosContratos: nil},
  {identificadorContrato: nil, uasg: "153032", modalidadeLicitacao: "3", codigoContrato: "54", licitacaoAssociada: "15303203000011978", objeto: "Concessão de prédio no Campus da UFLA", numeroAditivos: 3, numeroProcessos: 1, CPFContratada: "20372967000101", dataAssinatura: "1978-06-30", fundamentoGeral: nil, dataInicioVigencia: "1978-06-30", dataTerminoVigencia: "1979-12-31", valorInicial: "111132.0", aditivosContratos: nil, eventosContratos: nil},
  {identificadorContrato: nil, uasg: "154047", modalidadeLicitacao: "6", codigoContrato: "53", licitacaoAssociada: "15404706000011985", objeto: "locacao de imovel situado a rua andrade neves 1290 destinado a casa de estudante", numeroAditivos: 0, numeroProcessos: 231100003469320, CPFContratada: nil, dataAssinatura: "1985-06-01", fundamentoGeral: nil, dataInicioVigencia: "1998-11-01", dataTerminoVigencia: "1999-11-01", valorInicial: "102000.0", aditivosContratos: nil, eventosContratos: nil},
  {identificadorContrato: nil, uasg: "114606", modalidadeLicitacao: "6", codigoContrato: "50", licitacaoAssociada: "11460606000011999", objeto: "Contratação de imóveis para instalação da Agência do  IBGE   no município de Conceição do Araguaia/PA.", numeroAditivos: 1, numeroProcessos: 0, CPFContratada: nil, dataAssinatura: "1997-10-01", fundamentoGeral: nil, dataInicioVigencia: "1997-10-01", dataTerminoVigencia: "1999-09-30", valorInicial: "8400.0", aditivosContratos: nil, eventosContratos: nil},
Severity: Major
Found in db/seeds.rb - About 1 day to fix

    File controller.js has 318 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    angular.module('starter.controllers', ['callRails', 'Score', 'ngResource', 'openfb'])
        .controller('AppCtrl', function($scope, $ionicModal, $timeout) {})
    
        .controller("RankingController",
            function($scope, $http) {
    Severity: Minor
    Found in frontend/www/js/controller.js - About 3 hrs to fix

      Function exports has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(grunt) {
      
        grunt.initConfig({
      
          // Metadata.
      Severity: Major
      Found in bower_components/angular-loading-bar/Gruntfile.js - About 3 hrs to fix

        Function compare has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    $scope.compare = function(x, y, id) {
        
                        var size = document.getElementsByTagName('span').length;
                        if (x === y) {
                            document.getElementsByTagName('span')[id].innerHTML = "Certo!";
        Severity: Major
        Found in frontend/www/js/controller.js - About 2 hrs to fix

          Method calcRecompensa has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                def calcRecompensa(totalAcertos)
                  score  = 0;
                 for i in 1..(totalAcertos.to_i)
                    if (i < 3)
                       score += 50;
          Severity: Minor
          Found in app/controllers/player_controller.rb - About 45 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