Ousret/Picross-L3S6

View on GitHub

Showing 91 of 2,952 total issues

Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
Severity: Minor
Found in class/saisie.class.rb - About 45 mins to fix

    Method creer has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def PopUp.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
    Severity: Minor
    Found in class/popup.class.rb - About 45 mins to fix

      Block has too many lines. [30/25]
      Open

            @@contexte.listeComposant.each do |composant|
              #puts "Initialisation du composant #{composant.designation}"
              if (composant.instance_of? Text)
      
                @texte = createText composant
      Severity: Minor
      Found in class/render.class.rb by rubocop

      This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

      Method creer has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def Image.creer(uneDesignation, unCheminRelatif, unePositionX, unePositionY, unePositionZ)
      Severity: Minor
      Found in class/image.class.rb - About 35 mins to fix

        Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def initialize(uneDesignation, unCheminRelatif, unePositionX, unePositionY, unePositionZ) # :nodoc:
        Severity: Minor
        Found in class/image.class.rb - About 35 mins to fix

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

            def initializeGame
              @kInGame.supprimeTout
          
              background = Image.creer("Background", "ressources/maps/Couloirs-Resized.png", 0, 0, 0)
          
          
          Severity: Minor
          Found in main.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 demanderAide has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def demanderAide()
                  while y < @matriceComparaison.length
                      x=0
                      while x < @matriceComparaison.length
                          if(@matriceComparaison[x][y] == 1 and @matriceDeJeu[x][y] == 0 ) then
          Severity: Minor
          Found in class/grille.class.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 read_bmp_header has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

                  def read_bmp_header(file)
                  #méthode qui vérifie le header du file :
                  #permet de vérifier si le header correspond à notre traitement
          
                      header = file.read(14)
          Severity: Minor
          Found in class/bmp.class.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

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

            def actionOnChoice(unTypeEvenement, unComposantCible, unTexteCible = nil)
              if unComposantCible == nil && unTexteCible != nil
                @niveauCurseur = unTexteCible.to_s.to_i
                nouveauLibell = @kRender.game_scenes.getVertexIDFromName("niveau-cible")
                nouveauLibell.contenu = @niveauCurseur.to_s
          Severity: Minor
          Found in editor.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

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

            def getStats
              # Récupération des données
              @lastLevel = @kRegistre.getValue("lastLevel") || "1"
              @coins = @kRegistre.getValue("coins") || "0"
              @nTry = @kRegistre.getValue("try") || "0"
          Severity: Minor
          Found in main.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

          Block has too many lines. [26/25]
          Open

          ActiveRecord::Schema.define do
          
              unless ActiveRecord::Base.connection.tables.include? 'grilles'
                #definition de la table des grilles
                create_table :grilles do |table|
          Severity: Minor
          Found in class/connectSqlite3.rb by rubocop

          This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

          Severity
          Category
          Status
          Source
          Language