diff --git a/baseline-cli/src/main/kotlin/CommandLineTable.kt b/baseline-cli/src/main/kotlin/CommandLineTable.kt index 9143b6a..e47dd12 100644 --- a/baseline-cli/src/main/kotlin/CommandLineTable.kt +++ b/baseline-cli/src/main/kotlin/CommandLineTable.kt @@ -5,19 +5,15 @@ class CommandLineTable(private val header: List, private val rows: List< const val DEFAULT_COLUMN_SIZE = 50 } - private val columnSize: List - - init { - this.columnSize = columnSize.mapIndexed { ind, size -> - if (size != 0 || rows.isEmpty()) { - return@mapIndexed size - } - - max( - rows.maxOfOrNull { if (ind < it.size) it[ind].length else 0 } ?: DEFAULT_COLUMN_SIZE, - if (ind < header.size) header[ind].length else DEFAULT_COLUMN_SIZE - ) + private val columnSize: List = columnSize.mapIndexed { ind, size -> + if (size != 0 || rows.isEmpty()) { + return@mapIndexed size } + + max( + rows.maxOfOrNull { if (ind < it.size) it[ind].length else 0 } ?: DEFAULT_COLUMN_SIZE, + if (ind < header.size) header[ind].length else DEFAULT_COLUMN_SIZE + ) } fun buildTable(): String { diff --git a/qodana.yaml b/qodana.yaml index e6a7bb4..2925eb4 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -1,13 +1,13 @@ version: "1.0" -linter: jetbrains/qodana-jvm:2023.2 +linter: jetbrains/qodana-jvm:2024.1 projectJDK: "1.8" profile: name: qodana.recommended include: - name: CheckDependencyLicenses +raiseLicenseProblems: true +enablePackageSearch: true exclude: - name: All paths: - sarif/src/test/resources/ -dependencyIgnores: - - name: "colormath-jvm" \ No newline at end of file