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:
Method creer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def PopUp.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
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
- Read upRead up
- Exclude checks
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)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, unCheminRelatif, unePositionX, unePositionY, unePositionZ) # :nodoc:
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)
- Read upRead up
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
- Read upRead up
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)
- Read upRead up
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
- Read upRead up
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"
- Read upRead up
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|
- Read upRead up
- Exclude checks
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.