Skip to content

Commit 73b4fdb

Browse files
committed
lintfix
1 parent 34394c4 commit 73b4fdb

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/command/ExportDesktopCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class ExportDesktopCommand : CliktCommand(name = "export-desktop") {
186186
}
187187
}
188188
}
189-
189+
190190
// If not running from JAR, CLI is not properly installed
191191
return null
192192
}

tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/debug/DebuggerExecutionListener.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class DebuggerExecutionListener(
8282
BreakpointInfo(
8383
script = executionPoint.scriptName,
8484
line = executionPoint.line,
85-
enabled = breakpoint.enabled
85+
enabled = breakpoint.enabled,
8686
)
8787
}
8888

@@ -97,7 +97,10 @@ class DebuggerExecutionListener(
9797
}
9898
}
9999

100-
private suspend fun sendBreakpointHit(scriptName: String, line: Int) {
100+
private suspend fun sendBreakpointHit(
101+
scriptName: String,
102+
line: Int,
103+
) {
101104
val frames = callstack(globals.running).getCallFrames()
102105

103106
val upValues =

tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/debug/LuaValue.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ sealed class LuaValue {
1919
*/
2020
@Serializable
2121
data class Dictionary(val entries: Map<String, LuaValue>) : LuaValue()
22-
}
22+
}

tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/debug/RemoteCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ data class BreakpointHit(
7474
*/
7575
@Serializable
7676
data class CurrentBreakpoints(
77-
val breakpoints: List<BreakpointInfo>
77+
val breakpoints: List<BreakpointInfo>,
7878
) : EngineRemoteCommand
7979

8080
/**
@@ -88,5 +88,5 @@ data class CurrentBreakpoints(
8888
data class BreakpointInfo(
8989
val script: String,
9090
val line: Int,
91-
val enabled: Boolean
91+
val enabled: Boolean,
9292
)

tiny-cli/src/main/kotlin/com/github/minigdx/tiny/cli/ui/TinyDebuggerUI.kt

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ class TinyDebuggerUI(
7979

8080
// Custom table model to store variable values
8181
private val tableModel = object : DefaultTableModel(arrayOf("Name", "Value"), 0) {
82-
override fun isCellEditable(row: Int, column: Int): Boolean {
82+
override fun isCellEditable(
83+
row: Int,
84+
column: Int,
85+
): Boolean {
8386
// Make all cells non-editable
8487
return false
8588
}
@@ -93,7 +96,7 @@ class TinyDebuggerUI(
9396
val row = rowAtPoint(e.point)
9497
val column = columnAtPoint(e.point)
9598

96-
if (row >= 0 && column == 1) { // Only for the value column
99+
if (row >= 0 && column == 1) { // Only for the value column
97100
val name = getValueAt(row, 0) as String
98101
val luaValue = variableValues[name]
99102

@@ -390,9 +393,9 @@ class TinyDebuggerUI(
390393
// Create new pixel value: (alpha << 24) | (red << 16) | (green << 8) | blue
391394
val newPixelARGB =
392395
(originalAlpha shl 24) or
393-
(targetColor.red shl 16) or
394-
(targetColor.green shl 8) or
395-
targetColor.blue
396+
(targetColor.red shl 16) or
397+
(targetColor.green shl 8) or
398+
targetColor.blue
396399
newImage.setRGB(x, y, newPixelARGB)
397400
}
398401
}
@@ -434,7 +437,7 @@ class TinyDebuggerUI(
434437
preferredSize = dimension
435438
minimumSize = dimension
436439
maximumSize = dimension
437-
isFocusable = false // Prevent focus which can interfere with events
440+
isFocusable = false // Prevent focus which can interfere with events
438441
isRequestFocusEnabled = false
439442
}
440443

@@ -466,7 +469,10 @@ class TinyDebuggerUI(
466469
/**
467470
* Shows a dialog with a tree view of a dictionary.
468471
*/
469-
private fun showDictionaryDialog(name: String, dictionary: LuaValue.Dictionary) {
472+
private fun showDictionaryDialog(
473+
name: String,
474+
dictionary: LuaValue.Dictionary,
475+
) {
470476
// Use JDialog instead of JFrame to make it modal
471477
val dialog = javax.swing.JDialog(this, "Dictionary: $name", true)
472478
dialog.size = Dimension(400, 300)
@@ -500,7 +506,10 @@ class TinyDebuggerUI(
500506
/**
501507
* Recursively populates a tree node with the entries from a dictionary.
502508
*/
503-
private fun populateTreeNode(node: DefaultMutableTreeNode, dictionary: LuaValue.Dictionary) {
509+
private fun populateTreeNode(
510+
node: DefaultMutableTreeNode,
511+
dictionary: LuaValue.Dictionary,
512+
) {
504513
dictionary.entries.forEach { (key, value) ->
505514
when (value) {
506515
is LuaValue.Primitive -> {
@@ -520,7 +529,10 @@ class TinyDebuggerUI(
520529
/**
521530
* Adds a value to the table, handling both primitive values and dictionaries.
522531
*/
523-
private fun addValueToTable(name: String, value: LuaValue) {
532+
private fun addValueToTable(
533+
name: String,
534+
value: LuaValue,
535+
) {
524536
variableValues[name] = value
525537
tableModel.addRow(arrayOf(name, ""))
526538
}

0 commit comments

Comments
 (0)