Showing 91 of 2,952 total issues
Assignment Branch Condition size for initialize is too high. [15.39/15] Open
def initialize()
@kRender = Render::Game.new
@kRender.game_scenes.add_observer(self) #Pattern Observable
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Method setup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup
@scene_loops_per_second = 24
@@vertex = nil
Method creer
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def Sprite.creer(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
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 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 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 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 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 creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, unContenu, uneTaillePolice, unePositionX, unePositionY, unePositionZ) # :nodoc:
Method creer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Boutton.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 Fenetre.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
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 Text.creer(uneDesignation, unContenu, uneTaillePolice, unePositionX, unePositionY, unePositionZ)