Showing 91 of 2,952 total issues
Method has too many lines. [17/10] Open
def updateParam(uneCle, uneValeur)
if getValue(uneCle) == nil
return addParam uneCle, uneValeur
end
connect
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [17/10] Open
def addParam(uneCle, uneValeur)
if getValue(uneCle) != nil
return updateParam(uneCle, uneValeur)
end
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [17/10] Open
def initializeAbout
@kAbout.supprimeTout
# Image de fond
background = Image.creer("Background", "ressources/images/GUI/Prototypes/background-6.png", 0, 0, 0)
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for install is too high. [22.87/15] Open
def install
onlineLevels = fetchOnline
uneListeNiveau = Dir["ressources/images/imagesPicross/BMP24bitsRVB/*.bmp"].sort
i = 1
- 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
Assignment Branch Condition size for read_dib_header is too high. [21.84/15] 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
- 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
Assignment Branch Condition size for initialize is too high. [21.93/15] Open
def initialize(matrice)#:nodoc:
super()
#gestion des erreur a la construction de l'objet grille
- 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
Assignment Branch Condition size for initializeAbout is too high. [21.4/15] Open
def initializeAbout
@kAbout.supprimeTout
# Image de fond
background = Image.creer("Background", "ressources/images/GUI/Prototypes/background-6.png", 0, 0, 0)
- 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 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)
Cyclomatic complexity for getStats is too high. [11/6] 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
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Assignment Branch Condition size for getStats is too high. [20.62/15] 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
- 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
Assignment Branch Condition size for afficher is too high. [20.35/15] Open
def afficher(mat)
x=0
#affichache de la grille du haut
print("---------------------------affichache de la grille du haut---------------------------\n")
while x < @indicesHaut.length
- 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
Class Jeu
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Jeu
FAST_GAME = "Partie rapide"
ADVENTURE = "Aventure"
QUIT = "Quitter"
Assignment Branch Condition size for actionOnChoice is too high. [19.21/15] 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
- 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 has too many lines. [14/10] Open
def deleteParam(uneCle)
return false if getValue(uneCle) == nil
connect
#Procédure suceptible de lever une exception
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [14/10] Open
def actionOnMenu(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
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [14/10] Open
def initialize(matrice)#:nodoc:
super()
#gestion des erreur a la construction de l'objet grille
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Perceived complexity for getStats is too high. [11/7] 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
- Exclude checks
This cop tries to produce a complexity score that's a measure of the
complexity the reader experiences when looking at a method. For that
reason it considers when
nodes as something that doesn't add as much
complexity as an if
or a &&
. Except if it's one of those special
case
/when
constructs where there's no expression after case
. Then
the cop treats it as an if
/elsif
/elsif
... and lets all the when
nodes count. In contrast to the CyclomaticComplexity cop, this cop
considers else
nodes as adding complexity.
Example:
def my_method # 1
if cond # 1
case var # 2 (0.8 + 4 * 0.2, rounded)
when 1 then func_one
when 2 then func_two
when 3 then func_three
when 4..10 then func_other
end
else # 1
do_something until a && b # 2
end # ===
end # 7 complexity points
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 has too many lines. [12/10] Open
def getValue(uneCle)
connect
stm = @db.prepare "SELECT value FROM REGISTRE WHERE key = ?"
stm.bind_param 1, uneCle
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for calculeIndiceCote is too high. [17.75/15] 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
- 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