Skip to content

Commit 7bd7788

Browse files
authored
Revert "JS-822 Enable type-checking for single-file analysis" (#5926)
1 parent e413bd2 commit 7bd7788

86 files changed

Lines changed: 258 additions & 1343 deletions

File tree

Some content is hidden

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

its/plugin/fast-tests/src/test/java/com/sonar/javascript/it/plugin/ReferencedTSConfigTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,7 @@ void test() {
4646
result
4747
.logOutput()
4848
.stream()
49-
.filter(l ->
50-
l
51-
.message()
52-
.matches(
53-
"Creating TypeScript(\\(\\d\\.\\d\\.\\d\\))? program with configuration file.*"
54-
)
55-
)
49+
.filter(l -> l.message().matches("TypeScript(\\(\\d\\.\\d\\.\\d\\))? configuration file.*"))
5650
).hasSize(2);
5751
}
5852
}

its/plugin/fast-tests/src/test/java/com/sonar/javascript/it/plugin/TypeCheckerConfigTest.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,14 @@ void multiple_targets() {
7272
.extracting(Log::message)
7373
.filteredOn(m -> m.startsWith("Found 1 tsconfig.json file(s)"))
7474
.hasSize(1);
75-
assertThat(
76-
result
77-
.logOutput()
78-
.stream()
79-
.filter(l ->
80-
l
81-
.message()
82-
.matches("Creating TypeScript(\\(\\d\\.\\d\\.\\d\\))? program from entry point.*")
75+
assertThat(result.logOutput())
76+
.extracting(Log::message)
77+
.filteredOn(m ->
78+
m.equals(
79+
"Found 1 file(s) not part of any tsconfig.json: they will be analyzed without type information"
8380
)
84-
).hasSize(1);
81+
)
82+
.hasSize(1);
8583

8684
var issues = result
8785
.scannerOutputReader()

its/plugin/tests/src/test/java/com/sonar/javascript/it/plugin/TypeScriptAnalysisTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,14 @@ void should_exclude_from_extended_tsconfig() throws Exception {
247247

248248
assertThat(
249249
result.getLogsLines(l ->
250-
l.matches(".*Creating TypeScript(\\(\\d\\.\\d\\.\\d\\))? program from entry point.*")
250+
l.contains(
251+
"INFO: Found 1 file(s) not part of any tsconfig.json: they will be analyzed without type information"
252+
)
253+
)
254+
).hasSize(1);
255+
assertThat(
256+
result.getLogsLines(l ->
257+
l.contains("File not part of any tsconfig.json: dir/file.excluded.ts")
251258
)
252259
).hasSize(1);
253260
}

its/ruling/src/test/expected/jsts/TypeScript/javascript-S1874.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S2870.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S3402.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S3403.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S3800.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S4139.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

its/ruling/src/test/expected/jsts/TypeScript/javascript-S6582.json

Lines changed: 0 additions & 261 deletions
This file was deleted.

0 commit comments

Comments
 (0)