Skip to content

Commit a3a8254

Browse files
meanmailclaude
andcommitted
Fix compilation warnings
- Add @param: annotation target for KT-73255 warnings (@nls, @NonNls, @propertykey, @JsonProperty, @JsonDeserialize) - Use Disposer for addDocumentListener to avoid leak - Suppress deprecated API warnings with comments explaining why: - PySdkPathChoosingComboBox (no replacement available yet) - SolutionInitializer (SolutionInitializerService not in all versions) - PermanentInstallationID (no clear replacement) - RsToolchainFlavor methods (requires projectDir we don't have) - CheckboxTree constructor (CheckPolicy not available) - Remove deprecated kotlin.incremental.useClasspathSnapshot property - Remove custom createComma() shadowed by TomlPsiFactory member 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5f5cae1 commit a3a8254

24 files changed

Lines changed: 65 additions & 56 deletions

File tree

buildSrc/src/main/kotlin/common-conventions.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ tasks {
5959
jvmTarget = JvmTarget.JVM_21
6060
languageVersion = KotlinVersion.DEFAULT
6161
// see https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
62-
apiVersion = KotlinVersion.KOTLIN_1_8
62+
// Kotlin 2.1 is bundled with IntelliJ 2025.2+
63+
apiVersion = KotlinVersion.KOTLIN_2_1
6364
freeCompilerArgs = listOf("-Xjvm-default=all")
6465
}
6566
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ publishingVersion=
4545

4646
# Build speed optimizations
4747
kotlin.incremental=true
48-
kotlin.incremental.useClasspathSnapshot=true
4948
org.gradle.parallel=true

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/CourseYamlUtil.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@ private class CourseTypeSerializationConverter : StdConverter<String, String?>()
179179

180180
@JsonPOJOBuilder(withPrefix = "")
181181
open class CourseBuilder(
182-
@JsonProperty(TYPE) val courseType: String?,
183-
@JsonProperty(TITLE) val title: String,
184-
@JsonProperty(SUMMARY) val summary: String?,
185-
@JsonProperty(PROGRAMMING_LANGUAGE) val displayProgrammingLanguageName: String,
186-
@JsonProperty(PROGRAMMING_LANGUAGE_VERSION) val programmingLanguageVersion: String?,
187-
@JsonProperty(LANGUAGE) val language: String,
188-
@JsonProperty(ENVIRONMENT) val yamlEnvironment: String?,
189-
@JsonProperty(CONTENT) val content: List<String?> = emptyList(),
190-
@JsonProperty(SOLUTIONS_HIDDEN) val areSolutionsHidden: Boolean?,
191-
@JsonProperty(TAGS) val yamlContentTags: List<String> = emptyList(),
192-
@JsonProperty(ENVIRONMENT_SETTINGS) val yamlEnvironmentSettings: Map<String, String> = emptyMap(),
193-
@JsonProperty(ADDITIONAL_FILES) val yamlAdditionalFiles: List<EduFile> = emptyList(),
194-
@JsonProperty(CUSTOM_CONTENT_PATH) val pathToContent: String = "",
195-
@JsonProperty(DISABLED_FEATURES) val yamlDisabledFeatures: List<String> = emptyList()
182+
@param:JsonProperty(TYPE) val courseType: String?,
183+
@param:JsonProperty(TITLE) val title: String,
184+
@param:JsonProperty(SUMMARY) val summary: String?,
185+
@param:JsonProperty(PROGRAMMING_LANGUAGE) val displayProgrammingLanguageName: String,
186+
@param:JsonProperty(PROGRAMMING_LANGUAGE_VERSION) val programmingLanguageVersion: String?,
187+
@param:JsonProperty(LANGUAGE) val language: String,
188+
@param:JsonProperty(ENVIRONMENT) val yamlEnvironment: String?,
189+
@param:JsonProperty(CONTENT) val content: List<String?> = emptyList(),
190+
@param:JsonProperty(SOLUTIONS_HIDDEN) val areSolutionsHidden: Boolean?,
191+
@param:JsonProperty(TAGS) val yamlContentTags: List<String> = emptyList(),
192+
@param:JsonProperty(ENVIRONMENT_SETTINGS) val yamlEnvironmentSettings: Map<String, String> = emptyMap(),
193+
@param:JsonProperty(ADDITIONAL_FILES) val yamlAdditionalFiles: List<EduFile> = emptyList(),
194+
@param:JsonProperty(CUSTOM_CONTENT_PATH) val pathToContent: String = "",
195+
@param:JsonProperty(DISABLED_FEATURES) val yamlDisabledFeatures: List<String> = emptyList()
196196
) {
197197
@Suppress("unused") // used for deserialization
198198
private fun build(): Course {

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/EduFileYamlUtil.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ abstract class TaskFileYamlMixin : EduFileYamlMixin() {
7171
* A base class for building task files and additional files
7272
*/
7373
open class EduFileBuilder(
74-
@JsonProperty(NAME) val name: String?
74+
@param:JsonProperty(NAME) val name: String?
7575
) {
7676
protected open fun setupEduFile(eduFile: EduFile) {
7777
eduFile.name = name ?: formatError(message("yaml.editor.invalid.file.without.name"))
@@ -80,7 +80,7 @@ open class EduFileBuilder(
8080

8181
@JsonPOJOBuilder(buildMethodName = "buildAdditionalFile", withPrefix = "")
8282
class AdditionalFileBuilder(
83-
@JsonProperty(IS_BINARY) val isBinary: Boolean? = false,
83+
@param:JsonProperty(IS_BINARY) val isBinary: Boolean? = false,
8484
name: String?
8585
) : EduFileBuilder(name) {
8686

@@ -104,10 +104,10 @@ class AdditionalFileBuilder(
104104
@JsonPOJOBuilder(buildMethodName = "buildTaskFile", withPrefix = "")
105105
open class TaskFileBuilder(
106106
name: String?,
107-
@JsonProperty(VISIBLE) val visible: Boolean = true,
108-
@JsonProperty(EDITABLE) val editable: Boolean = true,
109-
@JsonProperty(PROPAGATABLE) val propagatable: Boolean = true,
110-
@JsonProperty(HIGHLIGHT_LEVEL) val errorHighlightLevel: EduFileErrorHighlightLevel = EduFileErrorHighlightLevel.ALL_PROBLEMS
107+
@param:JsonProperty(VISIBLE) val visible: Boolean = true,
108+
@param:JsonProperty(EDITABLE) val editable: Boolean = true,
109+
@param:JsonProperty(PROPAGATABLE) val propagatable: Boolean = true,
110+
@param:JsonProperty(HIGHLIGHT_LEVEL) val errorHighlightLevel: EduFileErrorHighlightLevel = EduFileErrorHighlightLevel.ALL_PROBLEMS
111111
) : EduFileBuilder(name) {
112112

113113
@Suppress("unused") //used for deserialization

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/FrameworkLessonYamlMixin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class FrameworkLessonYamlMixin : LessonYamlMixin() {
3030

3131
@JsonPOJOBuilder(withPrefix = "")
3232
open class FrameworkLessonBuilder(
33-
@JsonProperty(IS_TEMPLATE_BASED) val isTemplateBased: Boolean = true,
33+
@param:JsonProperty(IS_TEMPLATE_BASED) val isTemplateBased: Boolean = true,
3434
@JsonProperty(CONTENT) content: List<String?> = emptyList(),
3535
@JsonProperty(TAGS) contentTags: List<String> = emptyList(),
3636
@JsonProperty(CUSTOM_NAME) customName: String? = null

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/LessonYamlUtil.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ abstract class LessonYamlMixin {
4040

4141
@JsonPOJOBuilder(withPrefix = "")
4242
open class LessonBuilder(
43-
@JsonProperty(CONTENT) val content: List<String?> = emptyList(),
44-
@JsonProperty(CUSTOM_NAME) val customName: String? = null,
45-
@JsonProperty(TAGS) val contentTags: List<String> = emptyList()
43+
@param:JsonProperty(CONTENT) val content: List<String?> = emptyList(),
44+
@param:JsonProperty(CUSTOM_NAME) val customName: String? = null,
45+
@param:JsonProperty(TAGS) val contentTags: List<String> = emptyList()
4646
) {
4747
private fun build(): Lesson {
4848
val lesson = createLesson()

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/SectionYamlUtil.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ abstract class SectionYamlMixin {
3939

4040
@JsonPOJOBuilder(withPrefix = "")
4141
private class SectionBuilder(
42-
@JsonProperty(CONTENT) val content: List<String?> = emptyList(),
43-
@JsonProperty(CUSTOM_NAME) val customName: String? = null,
44-
@JsonProperty(TAGS) val contentTags: List<String> = emptyList()
42+
@param:JsonProperty(CONTENT) val content: List<String?> = emptyList(),
43+
@param:JsonProperty(CUSTOM_NAME) val customName: String? = null,
44+
@param:JsonProperty(TAGS) val contentTags: List<String> = emptyList()
4545
) {
4646
@Suppress("unused") //used for deserialization
4747
private fun build(): Section {

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/student/StudentFrameworkLessonYamlUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ abstract class StudentFrameworkLessonYamlMixin : FrameworkLessonYamlMixin() {
2222
}
2323

2424
private class StudentFrameworkLessonBuilder(
25-
@JsonProperty(CURRENT_TASK) val currentTaskIndex: Int,
25+
@param:JsonProperty(CURRENT_TASK) val currentTaskIndex: Int,
2626
@JsonProperty(IS_TEMPLATE_BASED) isTemplateBased: Boolean = true,
2727
@JsonProperty(CONTENT) content: List<String?> = emptyList(),
2828
@JsonProperty(TAGS) contentTags: List<String> = emptyList(),

hs-edu-format/src/org/hyperskill/academy/learning/yaml/format/student/StudentTaskFileUtil.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class IsBinaryFilter {
4646
}
4747

4848
class StudentTaskFileBuilder(
49-
@JsonProperty(TEXT) val textFromConfig: String?,
50-
@Encrypt @JsonProperty(ENCRYPTED_TEXT) val encryptedTextFromConfig: String?,
51-
@JsonProperty(LEARNER_CREATED) val learnerCreated: Boolean = false,
52-
@JsonProperty(IS_BINARY) val isBinary: Boolean? = false,
49+
@param:JsonProperty(TEXT) val textFromConfig: String?,
50+
@param:Encrypt @param:JsonProperty(ENCRYPTED_TEXT) val encryptedTextFromConfig: String?,
51+
@param:JsonProperty(LEARNER_CREATED) val learnerCreated: Boolean = false,
52+
@param:JsonProperty(IS_BINARY) val isBinary: Boolean? = false,
5353
name: String?,
5454
visible: Boolean = true,
5555
editable: Boolean = true,

intellij-plugin/hs-CSharp/src/org/hyperskill/academy/csharp/CSharpCourseProjectGenerator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION") // SolutionInitializer is deprecated, but SolutionInitializerService is not available in all supported versions
2+
13
package org.hyperskill.academy.csharp
24

35
import com.jetbrains.rd.ide.model.RdOpenSolution

0 commit comments

Comments
 (0)