Showing 34 of 2,952 total issues
File main.rb
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'observer'
require 'json'
require 'curb'
load './class/bmp.class.rb'
Method actionOnGame
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def actionOnGame(unTypeEvenement, unComposantCible, unTexteEntree=nil)
# Gestion des événements sur menu principal
return if unTypeEvenement != 1 # On ne recherche que le clique souris
btn_cible_libell = unComposantCible.designation
- 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 initializeGame
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initializeGame
@kInGame.supprimeTout
background = Image.creer("Background", "ressources/maps/Couloirs-Resized.png", 0, 0, 0)
Class Jeu
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Jeu
FAST_GAME = "Partie rapide"
ADVENTURE = "Aventure"
QUIT = "Quitter"
Method actionOnGame
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def actionOnGame(unTypeEvenement, unComposantCible, unTexteEntree=nil)
# Gestion des événements sur menu principal
return if unTypeEvenement != 1 # On ne recherche que le clique souris
btn_cible_libell = unComposantCible.designation
Method setAnimations
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def setAnimations
#Boucle de rafraichissement
always do
@@contexte.listeComposant.each do |composant|
- 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 setup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup
@scene_loops_per_second = 24
@@vertex = nil
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
Method creer
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Sprite.creer(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method read_dib_header
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def read_dib_header(file)
#méthode qui effectue des tests pour les exceptions :
#test si l'url est bonne
#test si l'image est convenable :
# l'image doit être codée avec du 24bit par pixel
- 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 initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, unCheminRelatif, lectureInfinie, uneAttenuation, uneFrequencePitch, unePositionX, unePositionY, unePositionZ) # :nodoc:
Method creer
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def Audio.creer(uneDesignation, unCheminRelatif, lectureInfinie, uneAttenuation, uneFrequencePitch, unePositionX, unePositionY, unePositionZ)
Method calculeIndiceHaut
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def calculeIndiceHaut()
nbCaseNoirConsecutif = 0 #variable qui permet de gerer les cases noir consecutifs
y=0
while y < @matriceComparaison.length #------------------------------------on parcours chaque colonne
- 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 setup
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def setup
@scene_loops_per_second = 24
@@vertex = nil
- 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 calculeIndiceCote
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def calculeIndiceCote()
nbCaseNoirConsecutif = 0 #variable qui permet de gerer les cases noir consecutifs
x=0
while x < @matriceComparaison.length #--------------------------------------on parcours chaque ligne
- 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 creer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Text.creer(uneDesignation, unContenu, uneTaillePolice, unePositionX, unePositionY, unePositionZ)
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 Fenetre.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method creer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Saisie.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method creer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Boutton.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)