Skip to content
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
28 changes: 28 additions & 0 deletions .github/workflows/qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Qodana

on:
workflow_dispatch:
push:
branches:
- master

pull_request:

jobs:
main:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
checks: write

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Qodana Scan
uses: JetBrains/qodana-action@v2025.3
with:
pr-mode: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ build/

.idea/**
!.idea/vcs.xml
!.idea/codeStyles/
!.idea/codeStyles/**
!.idea/dictionaries/
!.idea/dictionaries/**
!.idea/runConfigurations/
Expand Down
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public value class StarTuple(
@JvmInline
public value class StarDict(
// Map keys must be hashable.
// In Starlark, hashable values include None, Booleans, numbers, strings, and bytes, and tuples composed from hashable values.
// In Starlark, hashable values include None, Booleans, numbers, strings, and bytes, and tuples composed of hashable values.
// Most mutable values, such as lists, dictionaries, and sets, are not hashable, unless they are frozen.
// Attempting to use a non-hashable value as a key in a dictionary results in a dynamic error.
// Idea: check hashability at insertion time.
Expand Down Expand Up @@ -593,6 +593,7 @@ public value class StarDict(

override fun iterator(): Iterator<StarValue> = contents.keys.iterator()

@Suppress("DuplicatedCode") // It is too eager – 2 duplicates are fine. See IJPL-231960.
public companion object {
public val methods: Map<String, StarBuiltinFunction<StarDict>> = mapOf(
"clear" to StarBuiltinFunction("clear") { _, fn, args, kwargs ->
Expand Down Expand Up @@ -632,6 +633,7 @@ public value class StarSet(
override fun iterator(): Iterator<StarValue> = contents.iterator()

public companion object {
@Suppress("DuplicatedCode") // It is too eager – 2 duplicates are fine. See IJPL-231960.
public val methods: Map<String, StarBuiltinFunction<StarSet>> = mapOf(
"clear" to StarBuiltinFunction("clear") { _, fn, args, kwargs ->
if (fn.receiver == null) throw RuntimeError(message = "receiver must not be null")
Expand Down
8 changes: 8 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "1.0"
linter: jetbrains/qodana-jvm-community:2025.3

profile:
name: qodana.recommended

include:
- name: IncorrectFormatting
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ pluginManagement {
}

dependencyResolutionManagement {
@Suppress("UnstableApiUsage") // See https://github.com/gradle/gradle/issues/32443
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
@Suppress("UnstableApiUsage") // See https://github.com/gradle/gradle/issues/32443
repositories {
mavenCentral()
}
Expand Down
Loading