Skip to content

Commit 06db962

Browse files
hybloidtiulpin
authored andcommitted
Apply suggested fix by the linter
1 parent f38384d commit 06db962

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

baseline-cli/src/main/kotlin/CommandLineTable.kt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@ class CommandLineTable(private val header: List<String>, private val rows: List<
55
const val DEFAULT_COLUMN_SIZE = 50
66
}
77

8-
private val columnSize: List<Int>
9-
10-
init {
11-
this.columnSize = columnSize.mapIndexed { ind, size ->
12-
if (size != 0 || rows.isEmpty()) {
13-
return@mapIndexed size
14-
}
15-
16-
max(
17-
rows.maxOfOrNull { if (ind < it.size) it[ind].length else 0 } ?: DEFAULT_COLUMN_SIZE,
18-
if (ind < header.size) header[ind].length else DEFAULT_COLUMN_SIZE
19-
)
8+
private val columnSize: List<Int> = columnSize.mapIndexed { ind, size ->
9+
if (size != 0 || rows.isEmpty()) {
10+
return@mapIndexed size
2011
}
12+
13+
max(
14+
rows.maxOfOrNull { if (ind < it.size) it[ind].length else 0 } ?: DEFAULT_COLUMN_SIZE,
15+
if (ind < header.size) header[ind].length else DEFAULT_COLUMN_SIZE
16+
)
2117
}
2218

2319
fun buildTable(): String {

qodana.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ profile:
55
name: qodana.recommended
66
include:
77
- name: CheckDependencyLicenses
8+
raiseLicenseProblems: true
9+
enablePackageSearch: true
810
exclude:
911
- name: All
1012
paths:
11-
- sarif/src/test/resources/
13+
- sarif/src/test/resources/

0 commit comments

Comments
 (0)