From a8ecc55bee3c53346db9085bec33c53bc3613806 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Tue, 5 Nov 2024 18:01:14 +0100 Subject: [PATCH 1/4] Fix tests, dependency updates --- build.gradle.kts | 22 +++++++++---------- docs/diagnostics/ReservedParameterNames.md | 2 +- docs/en/diagnostics/DoubleNegatives.md | 2 +- .../configuration/parameters-schema.json | 2 +- .../languageserver/configuration/schema.json | 2 +- ...ReservedParameterNamesDiagnosticTest.java} | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/{ReservedParameterNamesTest.java => ReservedParameterNamesDiagnosticTest.java} (94%) diff --git a/build.gradle.kts b/build.gradle.kts index 2f08e91940e..c884b194a6d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,13 +12,13 @@ plugins { id("org.cadixdev.licenser") version "0.6.1" id("org.sonarqube") version "5.1.0.4882" id("io.freefair.lombok") version "8.10.2" - id("io.freefair.javadoc-links") version "8.10.2" + //id("io.freefair.javadoc-links") version "8.10.2" id("io.freefair.javadoc-utf-8") version "8.10.2" id("io.freefair.aspectj.post-compile-weaving") version "8.10.2" id("io.freefair.maven-central.validate-poms") version "8.10.2" id("me.qoomon.git-versioning") version "6.4.4" id("com.github.ben-manes.versions") version "0.51.0" - id("org.springframework.boot") version "3.2.5" + id("org.springframework.boot") version "3.3.5" id("io.spring.dependency-management") version "1.1.6" id("io.github.1c-syntax.bslls-dev-tools") version "0.8.1" id("ru.vyarus.pom") version "3.0.0" @@ -59,7 +59,7 @@ gitProperties { val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG -val languageToolVersion = "6.4" +val languageToolVersion = "6.5" dependencyManagement { imports { @@ -107,8 +107,8 @@ dependencies { implementation("org.aspectj", "aspectjrt", "1.9.22.1") // commons utils - implementation("commons-io", "commons-io", "2.16.1") - implementation("org.apache.commons", "commons-lang3", "3.14.0") + implementation("commons-io", "commons-io", "2.17.0") + implementation("org.apache.commons", "commons-lang3", "3.17.0") implementation("commons-beanutils", "commons-beanutils", "1.9.4"){ exclude("commons-logging", "commons-logging") } @@ -135,7 +135,7 @@ dependencies { // CONSTRAINTS implementation("com.google.guava:guava") { version { - strictly("33.2.1-jre") + strictly("33.3.1-jre") } } @@ -151,7 +151,7 @@ dependencies { // test utils testImplementation("org.jmockit", "jmockit", "1.49") - testImplementation("org.awaitility", "awaitility", "4.2.1") + testImplementation("org.awaitility", "awaitility", "4.2.2") } lombok { @@ -218,7 +218,7 @@ tasks.check { tasks.jacocoTestReport { reports { xml.required.set(true) - xml.outputLocation.set(File("$buildDir/reports/jacoco/test/jacoco.xml")) + xml.outputLocation.set(File("${layout.buildDirectory}/reports/jacoco/test/jacoco.xml")) } } @@ -238,12 +238,12 @@ tasks.generateDiagnosticDocs { doLast { val resourcePath = tasks["processResources"].outputs.files.singleFile copy { - from("$buildDir/docs/diagnostics") + from("${layout.buildDirectory}/docs/diagnostics") into("$resourcePath/com/github/_1c_syntax/bsl/languageserver/diagnostics/ru") } copy { - from("$buildDir/docs/en/diagnostics") + from("${layout.buildDirectory}/docs/en/diagnostics") into("$resourcePath/com/github/_1c_syntax/bsl/languageserver/diagnostics/en") } } @@ -285,7 +285,7 @@ sonarqube { property("sonar.projectKey", "1c-syntax_bsl-language-server") property("sonar.projectName", "BSL Language Server") property("sonar.exclusions", "**/gen/**/*.*") - property("sonar.coverage.jacoco.xmlReportPaths", "$buildDir/reports/jacoco/test/jacoco.xml") + property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory}/reports/jacoco/test/jacoco.xml") } } diff --git a/docs/diagnostics/ReservedParameterNames.md b/docs/diagnostics/ReservedParameterNames.md index 7a5ce85f5fc..51960a86f0a 100644 --- a/docs/diagnostics/ReservedParameterNames.md +++ b/docs/diagnostics/ReservedParameterNames.md @@ -1,4 +1,4 @@ -# Зарезервированные имена параметра (ReservedParameterNames) +# Зарезервированные имена параметров (ReservedParameterNames) ## Описание диагностики diff --git a/docs/en/diagnostics/DoubleNegatives.md b/docs/en/diagnostics/DoubleNegatives.md index 65eea5b15f4..e814dda74d1 100644 --- a/docs/en/diagnostics/DoubleNegatives.md +++ b/docs/en/diagnostics/DoubleNegatives.md @@ -2,4 +2,4 @@ -* Description +## Description diff --git a/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json b/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json index a6ca9ad3712..b6fd3f3fae7 100644 --- a/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json +++ b/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json @@ -1672,7 +1672,7 @@ }, "ReservedParameterNames": { "description": "Reserved parameter names", - "default": false, + "default": true, "type": [ "boolean", "object" diff --git a/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json b/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json index e515c9e742c..f117154cae3 100644 --- a/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json +++ b/src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/schema.json @@ -954,4 +954,4 @@ "default": "ask" } } -} +} \ No newline at end of file diff --git a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesTest.java b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesDiagnosticTest.java similarity index 94% rename from src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesTest.java rename to src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesDiagnosticTest.java index 415cd8c32de..5a90717ca32 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesTest.java +++ b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ReservedParameterNamesDiagnosticTest.java @@ -54,7 +54,7 @@ void testPositive() { assertThat(diagnostics).hasSize(1); assertThat(diagnostics, true) - .hasMessageOnRange("Переименуйте параметр \"ВидГруппыФормы\" чтобы он не совпадал с зарезервированным словом.", + .hasMessageOnRange("Переименуйте параметр \"ВидГруппыФормы\" так, чтобы он не совпадал с зарезервированным словом.", 2, 16, 30); } From f2f9a25eeb4b475f1d5e88d9a4561c53a2733a64 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Tue, 5 Nov 2024 18:15:41 +0100 Subject: [PATCH 2/4] Fake diagnostic description --- docs/en/diagnostics/DoubleNegatives.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/diagnostics/DoubleNegatives.md b/docs/en/diagnostics/DoubleNegatives.md index e814dda74d1..8cf35e0683b 100644 --- a/docs/en/diagnostics/DoubleNegatives.md +++ b/docs/en/diagnostics/DoubleNegatives.md @@ -3,3 +3,5 @@ ## Description + +Описание диагностики From eaa6a4e71121bd1edddb6138e6080b80b8f04a10 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Sun, 10 Nov 2024 00:02:38 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0=20=D1=81?= =?UTF-8?q?=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bsl/languageserver/diagnostics/DiagnosticInfosTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DiagnosticInfosTest.java b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DiagnosticInfosTest.java index 403bec0c3ef..6640b79aee6 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DiagnosticInfosTest.java +++ b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DiagnosticInfosTest.java @@ -75,9 +75,9 @@ void testAllDiagnosticsHaveDiagnosticMessage() { @Test void testAllDiagnosticsHaveDescriptionResource() { - assertThatCode(() -> diagnosticInfos.values().forEach(diagnosticInfo - -> assertThat(diagnosticInfo.getDescription()).isNotEmpty())) - .doesNotThrowAnyException(); + assertThat(diagnosticInfos).allSatisfy((key, diagnosticInfo) -> { + assertThat(diagnosticInfo.getDescription()).isNotEmpty(); + }); } @Test From 47ae06abba8284a79982a9dd66ce256c3d32209e Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Mon, 11 Nov 2024 00:03:51 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=B1=D1=80=D0=B0=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BA=20buildDirectory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c884b194a6d..02f2625bbbf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -218,7 +218,7 @@ tasks.check { tasks.jacocoTestReport { reports { xml.required.set(true) - xml.outputLocation.set(File("${layout.buildDirectory}/reports/jacoco/test/jacoco.xml")) + xml.outputLocation.set(File("${layout.buildDirectory.get()}/reports/jacoco/test/jacoco.xml")) } } @@ -238,12 +238,12 @@ tasks.generateDiagnosticDocs { doLast { val resourcePath = tasks["processResources"].outputs.files.singleFile copy { - from("${layout.buildDirectory}/docs/diagnostics") + from("${layout.buildDirectory.get()}/docs/diagnostics") into("$resourcePath/com/github/_1c_syntax/bsl/languageserver/diagnostics/ru") } copy { - from("${layout.buildDirectory}/docs/en/diagnostics") + from("${layout.buildDirectory.get()}/docs/en/diagnostics") into("$resourcePath/com/github/_1c_syntax/bsl/languageserver/diagnostics/en") } } @@ -285,7 +285,7 @@ sonarqube { property("sonar.projectKey", "1c-syntax_bsl-language-server") property("sonar.projectName", "BSL Language Server") property("sonar.exclusions", "**/gen/**/*.*") - property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory}/reports/jacoco/test/jacoco.xml") + property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory.get()}/reports/jacoco/test/jacoco.xml") } }