Skip to content

Commit f2c9bae

Browse files
committed
Release v1.11.0-RC.2
2 parents 241779f + cf5d6a2 commit f2c9bae

File tree

12 files changed

+42
-16
lines changed

12 files changed

+42
-16
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Set up JDK ${{ matrix.java_version }}
16-
uses: actions/setup-java@v3.0.0
16+
uses: actions/setup-java@v3.1.1
1717
with:
1818
java-version: ${{ matrix.java_version }}
1919
distribution: 'adopt'

.github/workflows/night_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
ref: nigth_build
1919
- name: Set up JDK
20-
uses: actions/setup-java@v3.0.0
20+
uses: actions/setup-java@v3.1.1
2121
with:
2222
java-version: 11
2323
distribution: 'adopt'

.github/workflows/qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- run: |
1818
git fetch --prune --unshallow
1919
- name: Set up JDK 11
20-
uses: actions/setup-java@v3.0.0
20+
uses: actions/setup-java@v3.1.1
2121
with:
2222
java-version: 11
2323
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
- name: Checkout source
1515
uses: actions/checkout@v3
1616
- name: Set up JDK
17-
uses: actions/setup-java@v3.0.0
17+
uses: actions/setup-java@v3.1.1
1818
with:
1919
java-version: 11
2020
distribution: 'adopt'
2121
- name: Build with Gradle
2222
run: ./gradlew build
2323
- name: Upload jar to release
24-
uses: AButler/upload-release-assets@v1.0
24+
uses: AButler/upload-release-assets@v2.0
2525
with:
2626
files: './build/libs/*.jar'
2727
repo-token: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
id("com.github.johnrengelman.shadow") version("7.0.0")
1111
id("com.github.ben-manes.versions") version "0.42.0"
1212
id("com.github.gradle-git-version-calculator") version "1.1.0"
13-
id("io.freefair.lombok") version "6.4.1"
13+
id("io.freefair.lombok") version "6.4.2"
1414
}
1515

1616
group = "io.github.1c-syntax"
@@ -36,7 +36,7 @@ dependencies {
3636
implementation("io.github.1c-syntax", "bsl-language-server", "0.20.0-rc.2")
3737

3838
implementation("org.apache.commons:commons-lang3:3.12.0")
39-
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.1")
39+
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.2.2")
4040

4141
// https://mvnrepository.com/artifact/org.sonarsource.analyzer-commons/sonar-analyzer-commons
4242
implementation("org.sonarsource.analyzer-commons:sonar-analyzer-commons:1.24.0.965")
@@ -55,7 +55,7 @@ dependencies {
5555
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.8.0")
5656

5757
testImplementation("org.assertj:assertj-core:3.22.0")
58-
testImplementation("org.mockito:mockito-core:4.3.1")
58+
testImplementation("org.mockito:mockito-core:4.4.0")
5959

6060
testImplementation("org.sonarsource.sonarqube", "sonar-testing-harness", sonarQubeVersion)
6161
testImplementation("org.sonarsource.sonarqube", "sonar-core", sonarQubeVersion)

src/main/java/com/github/_1c_syntax/bsl/sonar/BSLCoreSensor.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import java.util.Collections;
6767
import java.util.HashMap;
6868
import java.util.List;
69+
import java.util.ArrayList;
6970
import java.util.Locale;
7071
import java.util.Map;
7172
import java.util.stream.Collectors;
@@ -78,7 +79,7 @@ public class BSLCoreSensor implements Sensor {
7879
private final FileLinesContextFactory fileLinesContextFactory;
7980

8081
private final boolean langServerEnabled;
81-
private final List<String> sourcesList;
82+
private final List<String> sourcesList = new ArrayList<>();
8283
private final IssuesLoader issuesLoader;
8384
private final BSLHighlighter highlighter;
8485

@@ -89,12 +90,19 @@ public BSLCoreSensor(SensorContext context, FileLinesContextFactory fileLinesCon
8990
langServerEnabled = context.config().getBoolean(BSLCommunityProperties.LANG_SERVER_ENABLED_KEY)
9091
.orElse(BSLCommunityProperties.LANG_SERVER_ENABLED_DEFAULT_VALUE);
9192

92-
sourcesList = context.config().get("sonar.sources")
93+
sourcesList.addAll(context.config().get("sonar.sources")
9394
.map(sources ->
9495
Arrays.stream(StringUtils.split(sources, ","))
9596
.map(String::strip)
9697
.collect(Collectors.toList()))
97-
.orElse(Collections.singletonList("."));
98+
.orElse(Collections.singletonList(".")));
99+
100+
sourcesList.addAll(context.config().get("sonar.tests")
101+
.map(sources ->
102+
Arrays.stream(StringUtils.split(sources, ","))
103+
.map(String::strip)
104+
.collect(Collectors.toList()))
105+
.orElse(Collections.emptyList()));
98106

99107
issuesLoader = new IssuesLoader(context);
100108
highlighter = new BSLHighlighter(context);

src/test/java/com/github/_1c_syntax/bsl/sonar/BSLCoreSensorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class BSLCoreSensorTest {
5151

5252
private final String BASE_PATH = "src/test/resources/examples";
5353
private final File BASE_DIR = new File(BASE_PATH).getAbsoluteFile();
54-
private final String FILE_NAME = "test.bsl";
54+
private final String FILE_NAME = "src/test.bsl";
5555
private final Version SONAR_VERSION = Version.create(7, 9);
56-
private final SensorContextTester context = SensorContextTester.create(BASE_DIR);
56+
private final SensorContextTester context = createSensorContext();
5757

5858
@Test
5959
void testDescriptor() {
@@ -240,6 +240,8 @@ private SensorContextTester createSensorContext() {
240240
var context = SensorContextTester.create(BASE_DIR);
241241
context.fileSystem().setEncoding(StandardCharsets.UTF_8);
242242
context.setRuntime(sonarRuntime);
243+
context.settings().setProperty("sonar.sources", "src");
244+
context.settings().setProperty("sonar.tests", "test");
243245

244246
var inputFile = Tools.inputFileBSL(FILE_NAME, BASE_DIR);
245247
context.fileSystem().add(inputFile);

src/test/java/com/github/_1c_syntax/bsl/sonar/BSLHighlighterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class BSLHighlighterTest {
5353

5454
private final String BASE_PATH = "src/test/resources/src";
5555
private final File BASE_DIR = new File(BASE_PATH).getAbsoluteFile();
56-
private final String FILE_NAME = "test.bsl";
56+
private final String FILE_NAME = "src/test.bsl";
5757

5858
private SensorContextTester context;
5959
private BSLHighlighter highlighter;

src/test/java/com/github/_1c_syntax/bsl/sonar/IssuesLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class IssuesLoaderTest {
5050

5151
private final String BASE_PATH = "src/test/resources/examples";
5252
private final File BASE_DIR = new File(BASE_PATH).getAbsoluteFile();
53-
private final String FILE_NAME = "test.bsl";
53+
private final String FILE_NAME = "src/test.bsl";
5454

5555
@Test
5656
void test_createExtIssue() {

src/test/java/com/github/_1c_syntax/bsl/sonar/LanguageServerDiagnosticsLoaderSensorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void test_describe() {
5454
@Test
5555
void test_execute() {
5656

57-
var FILE_NAME = "test.bsl";
57+
var FILE_NAME = "src/test.bsl";
5858
var inputFile = Tools.inputFileBSL(FILE_NAME, BASE_DIR);
5959

6060
var sonarRuntime = SonarRuntimeImpl.forSonarLint(Version.create(7, 9));

0 commit comments

Comments
 (0)