Skip to content

Commit 0114fc6

Browse files
committed
Merge commit '009f67b48bde505a62494ab406ca7c26460da915'
# Conflicts: # docs/en/index.md # docs/index.md
2 parents 510ac7e + 009f67b commit 0114fc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+471
-283
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
# To get started with Dependabot version updates, you'll need to specify which
42
# package ecosystems to update and where the package manifests are located.
53
# Please see the documentation for all configuration options:
@@ -11,6 +9,10 @@ updates:
119
directory: "/" # Location of package manifests
1210
schedule:
1311
interval: "daily"
12+
groups:
13+
freefair:
14+
patterns:
15+
- "io.freefair.*"
1416
- package-ecosystem: "github-actions"
1517
directory: "/"
1618
schedule:

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
java_version: ['17', '19']
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up JDK ${{ matrix.java_version }}
16-
uses: actions/setup-java@v3.12.0
16+
uses: actions/setup-java@v4.2.1
1717
with:
1818
java-version: ${{ matrix.java_version }}
1919
distribution: 'adopt'
2020
- name: Build with Gradle
2121
run: ./gradlew check --stacktrace
2222
- name: Archive test results
2323
if: failure()
24-
uses: actions/upload-artifact@v3
24+
uses: actions/upload-artifact@v4
2525
with:
2626
name: junit_report_${{ matrix.os }}_${{ matrix.java_version }}
2727
path: build/reports/tests/test

.github/workflows/night_build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout source
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
ref: nigth_build
1919
- name: Set up JDK
20-
uses: actions/setup-java@v3.12.0
20+
uses: actions/setup-java@v4.2.1
2121
with:
2222
java-version: 17
2323
distribution: 'adopt'
@@ -28,9 +28,7 @@ jobs:
2828
- name: Save current date
2929
run: echo "PLUGIN_CURRENT_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
3030
- name: Deploy build
31-
uses: WebFreak001/deploy-nightly@v2.0.0
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
uses: WebFreak001/deploy-nightly@v3.1.0
3432
with:
3533
upload_url: https://uploads.github.com/repos/1c-syntax/sonar-bsl-plugin-community/releases/51033599/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
3634
release_id: 51033599 # same as above (id can just be taken out the upload_url, it's used to find old releases)

.github/workflows/qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: ''
1717
- run: |
1818
git fetch --prune --unshallow
1919
- name: Set up JDK 17
20-
uses: actions/setup-java@v3.12.0
20+
uses: actions/setup-java@v4.2.1
2121
with:
2222
java-version: 17
2323
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212

1313
steps:
1414
- name: Checkout source
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Set up JDK
17-
uses: actions/setup-java@v3.12.0
17+
uses: actions/setup-java@v4.2.1
1818
with:
1919
java-version: 17
2020
distribution: 'adopt'
2121
- name: Build with Gradle
2222
run: ./gradlew build
2323
- name: Upload jar to release
24-
uses: AButler/upload-release-assets@v2.0
24+
uses: AButler/upload-release-assets@v3.0
2525
with:
2626
files: './build/libs/*.jar'
2727
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,4 @@ gen/
6969
/.idea/compiler.xml
7070
/.idea/inspectionProfiles/Project_Default.xml
7171
/.idea/misc.xml
72+
/.idea/material_theme_project_new.xml

build.gradle.kts

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ plugins {
55
jacoco
66
java
77
`maven-publish`
8-
id("org.sonarqube") version "4.3.0.3225"
8+
id("org.sonarqube") version "5.0.0.4638"
99
id("org.cadixdev.licenser") version "0.6.1"
10-
id("com.github.johnrengelman.shadow") version("7.0.0")
11-
id("com.github.ben-manes.versions") version "0.47.0"
10+
id("com.github.johnrengelman.shadow") version ("7.0.0")
11+
id("com.github.ben-manes.versions") version "0.51.0"
1212
id("com.github.gradle-git-version-calculator") version "1.1.0"
13-
id("io.freefair.lombok") version "8.1.0"
13+
id("io.freefair.lombok") version "8.6"
1414
}
1515

1616
group = "io.github.1c-syntax"
@@ -20,7 +20,7 @@ repositories {
2020
mavenLocal()
2121
mavenCentral()
2222
maven {
23-
url = URI("https://s01.oss.sonatype.org/content/repositories/snapshots")
23+
url = URI("https://s01.oss.sonatype.org/content/repositories/snapshots")
2424
}
2525
maven {
2626
url = URI("https://jitpack.io")
@@ -32,45 +32,28 @@ val sonarQubeVersion = "9.9.0.65466"
3232
dependencies {
3333
implementation("org.sonarsource.api.plugin", "sonar-plugin-api", "9.14.0.375")
3434

35-
// в jitpack лежат в группе com.github.1c-syntax, в централе - io.github.1c-syntax
36-
implementation("io.github.1c-syntax", "bsl-language-server", "0.22.0") {
37-
exclude("com.github.1c-syntax", "utils")
35+
implementation("io.github.1c-syntax", "bsl-language-server", "0.23.0") {
36+
exclude("com.contrastsecurity", "java-sarif")
37+
exclude("io.sentry", "sentry-logback")
38+
exclude("org.springframework.boot", "spring-boot-starter-websocket")
3839
}
39-
implementation("com.github.1c-syntax", "utils", "0.5.1")
4040

41-
implementation("org.apache.commons:commons-lang3:3.13.0")
42-
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
43-
44-
// https://mvnrepository.com/artifact/org.sonarsource.analyzer-commons/sonar-analyzer-commons
45-
implementation("org.sonarsource.analyzer-commons:sonar-analyzer-commons:2.5.0.1358")
41+
implementation("org.sonarsource.analyzer-commons", "sonar-analyzer-commons", "2.5.0.1358")
4642

4743
// MD to HTML converter of BSL LS rule descriptions
4844
implementation("org.commonmark", "commonmark", "0.21.0")
4945
implementation("org.commonmark", "commonmark-ext-gfm-tables", "0.21.0")
5046
implementation("org.commonmark", "commonmark-ext-autolink", "0.21.0")
5147
implementation("org.commonmark", "commonmark-ext-heading-anchor", "0.21.0")
5248

53-
implementation("me.tongfei:progressbar:0.9.5")
54-
55-
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
56-
5749
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.8.0")
58-
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.8.0")
59-
60-
testImplementation("org.assertj:assertj-core:3.24.2")
61-
testImplementation("org.mockito:mockito-core:5.4.0")
62-
50+
testImplementation("org.assertj", "assertj-core", "3.25.1")
51+
testImplementation("org.mockito", "mockito-core", "5.8.0")
6352
testImplementation("org.sonarsource.sonarqube", "sonar-testing-harness", sonarQubeVersion)
6453
testImplementation("org.sonarsource.sonarqube", "sonar-core", sonarQubeVersion)
6554
testImplementation("org.reflections", "reflections", "0.9.12")
6655

67-
// CONSTRAINTS
68-
69-
implementation("com.google.guava:guava") {
70-
version {
71-
strictly("32.0.1-jre")
72-
}
73-
}
56+
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.8.0")
7457
}
7558

7659
java {
@@ -136,6 +119,7 @@ tasks.jar {
136119
attributes["Plugin-Class"] = "com.github._1c_syntax.bsl.sonar.BSLPlugin"
137120
attributes["Plugin-Name"] = "1C (BSL) Community Plugin"
138121
attributes["Plugin-Version"] = "${project.version}"
122+
attributes["Plugin-RequiredForLanguages"] = "bsl"
139123

140124
attributes["Plugin-License"] = "GNU LGPL v3"
141125

@@ -151,7 +135,6 @@ tasks.jar {
151135
attributes["Plugin-OrganizationUrl"] = "https://github.com/1c-syntax"
152136
}
153137

154-
155138
enabled = false
156139
dependsOn(tasks.shadowJar)
157140
}

docs/en/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
SonarQube Version | Plugin Version | JAVA version
3232
------------------|----------------|------------------
33-
9.9+ | 1.13.0+ | 17
34-
8.9+ | 1.11.0...1.12.0| 11
35-
7.9+ | 0.7.0....1.10.0| 11
36-
7.4 - 7.8 | 0.1.0....0.6.0 | 8
33+
9.9+ | 1.13.0+ | 17
34+
8.9+ | 1.11.0...1.12.0| 11
35+
7.9+ | 0.7.0...1.10.0 | 11
36+
7.4 - 7.8 | 0.1.0...0.6.0 | 8
3737

3838
## Run analysis
3939

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
-----------------|----------------|------------------
3636
9.9+ | 1.13.0+ | 17
3737
8.9+ | 1.11.0...1.12.0| 11
38-
7.9+ | 0.7.0....1.10.0| 11
39-
7.4 - 7.8 | 0.1.0....0.6.0 | 8
38+
7.9+ | 0.7.0...1.10.0 | 11
39+
7.4 - 7.8 | 0.1.0...0.6.0 | 8
4040

4141
## Запуск анализа
4242

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of SonarQube 1C (BSL) Community Plugin.
33
*
4-
* Copyright (c) 2018-2023
4+
* Copyright (c) 2018-2024
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com>
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later
@@ -30,7 +30,6 @@
3030
import java.util.Arrays;
3131
import java.util.List;
3232
import java.util.Locale;
33-
import java.util.stream.Collectors;
3433
import java.util.stream.Stream;
3534

3635

@@ -54,89 +53,70 @@ public final class BSLCommunityProperties {
5453
public static final String BSL_FILE_EXTENSIONS_DEFAULT_VALUE = ".bsl,.os";
5554

5655
public static final String BSL_CATEGORY = "1C (BSL)";
57-
private static final String EXTERNAL_ANALYZERS_CATEGORY = "External Analyzers";
58-
private static final String BSL_SUBCATEGORY = "1C (BSL) Community";
5956

57+
private static final String BSL_SUBCATEGORY = "1C (BSL) Community";
6058

6159
private BSLCommunityProperties() {
6260
// only statics
6361
}
6462

6563
public static List<PropertyDefinition> getProperties() {
6664
return Arrays.asList(
67-
PropertyDefinition.builder(LANG_SERVER_DIAGNOSTIC_LANGUAGE_KEY)
68-
.name("BSL Language server rule names and messages language")
69-
.description(
70-
"Defines the language of the rules names (on APP level) and language of rules message (on PROJECT level)"
71-
)
72-
.defaultValue(LANG_SERVER_DIAGNOSTIC_LANGUAGE_DEFAULT_VALUE)
65+
PropertyDefinitionUtils.newPropertyBuilderBSL(0,
66+
LANG_SERVER_DIAGNOSTIC_LANGUAGE_KEY,
67+
"diagnosticLanguage",
68+
LANG_SERVER_DIAGNOSTIC_LANGUAGE_DEFAULT_VALUE)
7369
.type(PropertyType.SINGLE_SELECT_LIST)
7470
.options(Language.RU.getLanguageCode(), Language.EN.getLanguageCode())
75-
.category(BSL_CATEGORY)
7671
.onQualifiers(Qualifiers.APP, Qualifiers.PROJECT)
77-
.index(0)
7872
.build(),
79-
PropertyDefinition.builder(LANG_SERVER_ENABLED_KEY)
80-
.name("BSL Language Server enabled")
81-
.description("Run internal BSL Language Server Diagnostic Provider")
82-
.defaultValue(LANG_SERVER_ENABLED_DEFAULT_VALUE.toString())
73+
PropertyDefinitionUtils.newPropertyBuilderBSL(1,
74+
LANG_SERVER_ENABLED_KEY,
75+
"enabled",
76+
LANG_SERVER_ENABLED_DEFAULT_VALUE.toString())
8377
.type(PropertyType.BOOLEAN)
84-
.category(BSL_CATEGORY)
8578
.onQualifiers(Qualifiers.PROJECT)
86-
.index(1)
8779
.build(),
88-
PropertyDefinition.builder(LANG_SERVER_COMPUTE_DIAGNOSTICS_SKIP_SUPPORT_KEY)
89-
.name("BSL Language Server - Skip computing diagnostics on modules with parent configurations")
90-
.description("Skip computing diagnostics according to module's support mode " +
91-
"(if there is a parent configuration).")
92-
.category(BSL_CATEGORY)
93-
.defaultValue(LANG_SERVER_COMPUTE_DIAGNOSTICS_SKIP_SUPPORT_DEFAULT_VALUE)
80+
PropertyDefinitionUtils.newPropertyBuilderBSL(2,
81+
LANG_SERVER_COMPUTE_DIAGNOSTICS_SKIP_SUPPORT_KEY,
82+
"skipSupport",
83+
LANG_SERVER_COMPUTE_DIAGNOSTICS_SKIP_SUPPORT_DEFAULT_VALUE)
9484
.type(PropertyType.SINGLE_SELECT_LIST)
9585
.options(Stream.of(SkipSupport.values())
9686
.map(value -> value.name().toLowerCase(Locale.ENGLISH).replace("_", " "))
97-
.collect(Collectors.toList())
87+
.toList()
9888
)
9989
.onQualifiers(Qualifiers.PROJECT)
100-
.index(2)
10190
.build(),
102-
PropertyDefinition.builder(LANG_SERVER_OVERRIDE_CONFIGURATION_KEY)
103-
.name("BSL Language Server - Use configuration file")
104-
.description("Override SonarQube settings with BSL LS configuration file.")
105-
.category(BSL_CATEGORY)
106-
.defaultValue(LANG_SERVER_OVERRIDE_CONFIGURATION_DEFAULT_VALUE.toString())
91+
PropertyDefinitionUtils.newPropertyBuilderBSL(3,
92+
LANG_SERVER_OVERRIDE_CONFIGURATION_KEY,
93+
"overrideConfiguration",
94+
LANG_SERVER_OVERRIDE_CONFIGURATION_DEFAULT_VALUE.toString())
10795
.type(PropertyType.BOOLEAN)
10896
.onQualifiers(Qualifiers.PROJECT)
109-
.index(3)
11097
.build(),
111-
PropertyDefinition.builder(LANG_SERVER_CONFIGURATION_PATH_KEY)
112-
.name("BSL Language Server - Configuration file")
113-
.description("Path to BSL LS configuration file.")
114-
.category(BSL_CATEGORY)
115-
.defaultValue(LANG_SERVER_CONFIGURATION_PATH_DEFAULT_VALUE)
98+
PropertyDefinitionUtils.newPropertyBuilderBSL(4,
99+
LANG_SERVER_CONFIGURATION_PATH_KEY,
100+
"enabled.configurationPath",
101+
LANG_SERVER_CONFIGURATION_PATH_DEFAULT_VALUE)
116102
.type(PropertyType.STRING)
117103
.onQualifiers(Qualifiers.PROJECT)
118-
.index(4)
119104
.build(),
120-
PropertyDefinition.builder(BSL_FILE_EXTENSIONS_KEY)
121-
.name("BSL File suffixes")
122-
.description("List of file suffixes that will be scanned.")
123-
.category(BSL_CATEGORY)
124-
.defaultValue(BSL_FILE_EXTENSIONS_DEFAULT_VALUE)
105+
PropertyDefinitionUtils.newPropertyBuilderBSL(5,
106+
BSL_FILE_EXTENSIONS_KEY,
107+
"file.suffixes",
108+
BSL_FILE_EXTENSIONS_DEFAULT_VALUE)
125109
.onQualifiers(Qualifiers.PROJECT)
126110
.multiValues(true)
127-
.index(5)
128111
.build(),
129-
PropertyDefinition.builder(LANG_SERVER_REPORT_PATH_KEY)
130-
.name("BSL Language Server Report Files")
131-
.description("Paths (absolute or relative) to xml files with BSL Language Server diagnostics")
132-
.defaultValue("")
133-
.category(EXTERNAL_ANALYZERS_CATEGORY)
112+
PropertyDefinitionUtils.newPropertyBuilderExternal(0,
113+
LANG_SERVER_REPORT_PATH_KEY,
114+
"reportPaths",
115+
"")
134116
.subCategory(BSL_SUBCATEGORY)
135117
.onQualifiers(Qualifiers.PROJECT)
136118
.multiValues(true)
137-
.index(0)
138119
.build()
139120
);
140121
}
141-
142122
}

0 commit comments

Comments
 (0)