Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update qodana linter version #21

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions baseline-cli/src/main/kotlin/CommandLineTable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ class CommandLineTable(private val header: List<String>, private val rows: List<
const val DEFAULT_COLUMN_SIZE = 50
}

private val columnSize: List<Int>

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<Int> = 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 {
Expand Down
6 changes: 3 additions & 3 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -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"
Loading