Environment:
- Java: JetBrains s.r.o. 17.0.10
- OS: Linux amd64
- IDE: IntelliJ IDEA 2024.1
- SonarLint: 10.4.2.78113
The following code gives the wrong S6518 warning Replace function call with indexed accessor.:
yaml.yamlMap.get<YamlMap>("info")?.getScalar("title")?.content ?: error("info.title not specified")
Or is there a way to provide a type with yaml.yamlMap["info"] in kotlin?
I’m using the com. charleskorn. kaml package.