Showing 57 of 67 total issues
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize()
SudokuAPI.API.add_observer(self);
header = Gtk::HeaderBar.new();
header.set_title(Window.window.title);
header.set_subtitle("Demo");
- Create a ticketCreate a ticket
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(difficulty, grid_string = "")
puts "Generating new sudoku..."
# Either take a pre-created puzzle, or create a new one programmatically
random = Random.new
- Create a ticketCreate a ticket
Method buildLeftContainer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def buildLeftContainer()
# Split container into 2 parts : Top (Grid) & Bottom (Assistant)
leftContainer = Gtk::Grid.new();
GridView.init(leftContainer);
- Create a ticketCreate a ticket
Method saveSudoku
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def saveSudoku(fileName)
saveFile = File.new("save_files/"+fileName, "w")
if(!saveFile.closed?)
print "Fichier de sauvegarde ouvert\n"
- Create a ticketCreate a ticket
Method loadSudoku
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def loadSudoku(fileName)
filePath = "save_files/#{fileName}"
if(File.file?(filePath))
loadFile = File.new(filePath, "r")
- Create a ticketCreate a ticket
Method saveSudoku
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def saveSudoku(fileName)
saveFile = File.new("save_files/"+fileName, "w")
if(!saveFile.closed?)
print "Fichier de sauvegarde ouvert\n"
- Read upRead up
- Create a ticketCreate a ticket
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 onSudokuMethod
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def onSudokuMethod
if(@step == nil)
statutMethod(true)
- Read upRead up
- Create a ticketCreate a ticket
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 traitementOnRow
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def traitementOnRow(region,sens,ligne)
if(ligne==1)
tab = squareNumber(region,0,sens) #retourne case d'une ligne ou colonne
tab2 = squareNumber(region,1,sens) #retourne case d'une ligne ou colonne
tab3 = squareNumber(region,2,sens) #retourne case d'une ligne ou colonne
- Read upRead up
- Create a ticketCreate a ticket
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 demoMethod
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def demoMethod
if(@step == nil)
statutMethod(true)
@step = 0
- Create a ticketCreate a ticket
Method traitementOnRow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def traitementOnRow(region,sens,ligne)
if(ligne==1)
tab = squareNumber(region,0,sens) #retourne case d'une ligne ou colonne
tab2 = squareNumber(region,1,sens) #retourne case d'une ligne ou colonne
tab3 = squareNumber(region,2,sens) #retourne case d'une ligne ou colonne
- Create a ticketCreate a ticket
Method demoMethod
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def demoMethod
@type = "demoMethod"
case @step
when nil
@step = 0
- Create a ticketCreate a ticket
Method test_sudokuAPI
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_sudokuAPI
grid = Sudoku.create("000000083004800070000000250500090060310700805068010007400901000890563000000407509")
s = SudokuAPI.API();
SudokuAPI.API.setSudoku(grid)
- Create a ticketCreate a ticket
Method show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def OverlayManager.show()
@@open = true;
square = SquareView.selectedSquareView();
caze = SquareView.selectedSquareView().caze;
OverlayManager.clear();
- Create a ticketCreate a ticket
Method initialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def initialize(overlay)
@@buttons = Array.new();
@@overlayPanel = Gtk::Fixed.new();
sudokuChoiceGrid = Gtk::Grid.new();
sudokuChoiceGrid.name = "overlay-grid";
- Read upRead up
- Create a ticketCreate a ticket
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 valid?
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def valid?()
return false unless @grid
return false unless @grid.length == 81
- Read upRead up
- Create a ticketCreate a ticket
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 setLineStyle
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def setLineStyle(ctx, x, y, vertical)
isBigLine = vertical ? (x % 3 == 0) : (y % 3 == 0);
isExternalLine = vertical ? (x == 0 || x == 9) : (y == 0 || y == 9);
color = 0.0;
ctx.set_line_width(isBigLine ? (isExternalLine ? 4 : 2) : 0.5);
- Read upRead up
- Create a ticketCreate a ticket
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 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize()
@confEntry = Config.entries
@entryNewList = Array.new
@avatarList = Dir[AssetManager.assetsDir() + "/avatar_small/*.png"]
- Create a ticketCreate a ticket
Method initialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize()
puts("Creating window...");
SudokuAPI.API.add_observer(self);
@@window = Gtk::Window.new("Sudoku");
- Create a ticketCreate a ticket
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize valeurs
super()
## TODO: Lire largeur et hauteur dans un fichier de config
- Create a ticketCreate a ticket
Method squareNumber
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def squareNumber(region,number,sens)
tab_region = SudokuAPI.API.squareN(region)
i = 0
sous_region=Array.new()
tab_region.each do |elt|
- Read upRead up
- Create a ticketCreate a ticket
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"