Skip to content

Commit ec4ff13

Browse files
zgliczclaudegithub-actions[bot]
authored
JS-1452 Enrich TypeScript program with detected ES version (#6517)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1e81938 commit ec4ff13

20 files changed

Lines changed: 777 additions & 44 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void multiple_targets() {
8282
.filteredOn(
8383
l ->
8484
l.level().equals(Log.Level.INFO) &&
85-
l.message().equals("Analyzing 1 file(s) using merged compiler options")
85+
l.message().startsWith("Analyzing 1 file(s) using merged compiler options")
8686
)
8787
.hasSize(1);
8888

its/plugin/sonarlint-tests/src/test/java/com/sonar/javascript/it/plugin/sonarlint/tests/SonarLintIntegrationTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ void should_react_to_changes_in_tsconfigs(SonarLintTestHarness harness, @TempDir
149149
assertResults(results -> {
150150
assertThat(results).hasSize(2);
151151
assertThat(client.getLogMessages()).contains("Resetting the TsConfigCache");
152-
assertThat(client.getLogMessages()).contains(
153-
"Using tsconfig " +
154-
tsconfigDTO.getFsPath().toFile().getAbsolutePath().replace('\\', '/') +
155-
" for " +
156-
jsFileDTO.getFsPath().toFile().getAbsolutePath().replace('\\', '/')
152+
assertThat(client.getLogMessages()).anyMatch(log ->
153+
log.startsWith(
154+
"Using tsconfig " +
155+
tsconfigDTO.getFsPath().toFile().getAbsolutePath().replace('\\', '/') +
156+
" for " +
157+
jsFileDTO.getFsPath().toFile().getAbsolutePath().replace('\\', '/')
158+
)
157159
);
158160
assertThat(results.get(0).getRuleKey()).isEqualTo("typescript:S3504");
159161
assertThat(results.get(1).getRuleKey()).isEqualTo("typescript:S2870");
@@ -196,8 +198,8 @@ void should_react_to_changes_in_tsconfigs(SonarLintTestHarness harness, @TempDir
196198
assertResults(results -> {
197199
assertThat(results).hasSize(2);
198200
assertThat(client.getLogMessages()).contains("Resetting the TsConfigCache");
199-
assertThat(client.getLogMessages()).contains(
200-
"No tsconfig found for files, using default options"
201+
assertThat(client.getLogMessages()).anyMatch(log ->
202+
log.startsWith("No tsconfig found for files, using default options")
201203
);
202204
assertThat(results.get(0).getRuleKey()).isEqualTo("typescript:S3504");
203205
assertThat(results.get(1).getRuleKey()).isEqualTo("typescript:S2870");
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Joust:ts/components/EventLog.tsx": [
3+
96
4+
]
5+
}
Lines changed: 291 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,310 @@
11
{
2+
"ag-grid:src/ts/columnController/autoGroupColService.ts": [
3+
21
4+
],
5+
"ag-grid:src/ts/columnController/balancedColumnTreeBuilder.ts": [
6+
63,
7+
110
8+
],
9+
"ag-grid:src/ts/columnController/columnController.ts": [
10+
339,
11+
371,
12+
515,
13+
611,
14+
617,
15+
972,
16+
1029,
17+
1032,
18+
1083,
19+
1116,
20+
1129,
21+
1217,
22+
1441,
23+
1444,
24+
1457,
25+
1460,
26+
1608,
27+
1709,
28+
1713,
29+
1720,
30+
1731,
31+
1738,
32+
1739,
33+
1776,
34+
1885,
35+
1922,
36+
1989
37+
],
38+
"ag-grid:src/ts/columnController/columnUtils.ts": [
39+
105,
40+
118,
41+
131
42+
],
43+
"ag-grid:src/ts/columnController/displayedGroupCreator.ts": [
44+
38,
45+
113,
46+
130
47+
],
48+
"ag-grid:src/ts/components/agGridWebComponent.ts": [
49+
23
50+
],
51+
"ag-grid:src/ts/components/componentUtil.ts": [
52+
81,
53+
101,
54+
106,
55+
111,
56+
116,
57+
148,
58+
153,
59+
158,
60+
163
61+
],
62+
"ag-grid:src/ts/context/beanStub.ts": [
63+
13
64+
],
265
"ag-grid:src/ts/context/context.ts": [
66+
67,
67+
121,
68+
124,
69+
168,
70+
172,
371
191,
472
248,
573
251,
674
258,
775
261,
876
282
977
],
78+
"ag-grid:src/ts/dragAndDrop/dragAndDropService.ts": [
79+
154,
80+
170,
81+
180,
82+
242
83+
],
84+
"ag-grid:src/ts/dragAndDrop/dragService.ts": [
85+
43,
86+
261
87+
],
88+
"ag-grid:src/ts/entities/columnGroup.ts": [
89+
69,
90+
135,
91+
152,
92+
161,
93+
216,
94+
226,
95+
255
96+
],
97+
"ag-grid:src/ts/entities/originalColumnGroup.ts": [
98+
73
99+
],
100+
"ag-grid:src/ts/entities/rowNode.ts": [
101+
265,
102+
499
103+
],
104+
"ag-grid:src/ts/eventService.ts": [
105+
77,
106+
82,
107+
86
108+
],
109+
"ag-grid:src/ts/filter/filterManager.ts": [
110+
264,
111+
353
112+
],
113+
"ag-grid:src/ts/gridCore.ts": [
114+
271
115+
],
116+
"ag-grid:src/ts/gridPanel/gridPanel.ts": [
117+
376,
118+
393,
119+
395,
120+
404,
121+
406,
122+
725
123+
],
124+
"ag-grid:src/ts/gridSerializer.ts": [
125+
256,
126+
265,
127+
283,
128+
337
129+
],
130+
"ag-grid:src/ts/headerRendering/bodyDropPivotTarget.ts": [
131+
32
132+
],
133+
"ag-grid:src/ts/headerRendering/cssClassApplier.ts": [
134+
49
135+
],
136+
"ag-grid:src/ts/headerRendering/headerContainer.ts": [
137+
44,
138+
117
139+
],
140+
"ag-grid:src/ts/headerRendering/headerGroup/headerGroupWrapperComp.ts": [
141+
127,
142+
134,
143+
142,
144+
182,
145+
193,
146+
222,
147+
238,
148+
259
149+
],
150+
"ag-grid:src/ts/headerRendering/headerRenderer.ts": [
151+
48,
152+
71,
153+
76,
154+
89
155+
],
156+
"ag-grid:src/ts/headerRendering/headerRowComp.ts": [
157+
54,
158+
67,
159+
166
160+
],
10161
"ag-grid:src/ts/layout/borderLayout.ts": [
11-
107
162+
107,
163+
169
164+
],
165+
"ag-grid:src/ts/layout/tabbedLayout.ts": [
166+
32,
167+
51
168+
],
169+
"ag-grid:src/ts/masterSlaveService.ts": [
170+
56,
171+
97,
172+
109,
173+
169
174+
],
175+
"ag-grid:src/ts/misc/focusService.ts": [
176+
100,
177+
105
178+
],
179+
"ag-grid:src/ts/rendering/autoWidthCalculator.ts": [
180+
98
12181
],
13182
"ag-grid:src/ts/rendering/cellEditors/selectCellEditor.ts": [
14183
23
15184
],
185+
"ag-grid:src/ts/rendering/columnAnimationService.ts": [
186+
85,
187+
86
188+
],
189+
"ag-grid:src/ts/rendering/renderedRow.ts": [
190+
377,
191+
451,
192+
489,
193+
550,
194+
575,
195+
588,
196+
594,
197+
595,
198+
665,
199+
688,
200+
705,
201+
724,
202+
763,
203+
768,
204+
913,
205+
929,
206+
1103,
207+
1110,
208+
1111,
209+
1156,
210+
1157,
211+
1167,
212+
1168,
213+
1186,
214+
1193,
215+
1194
216+
],
217+
"ag-grid:src/ts/rendering/rowRenderer.ts": [
218+
121,
219+
132,
220+
347,
221+
363,
222+
474,
223+
514,
224+
518
225+
],
226+
"ag-grid:src/ts/rowModels/cache/rowNodeBlock.ts": [
227+
149,
228+
206,
229+
220
230+
],
231+
"ag-grid:src/ts/rowModels/cache/rowNodeBlockLoader.ts": [
232+
53,
233+
71
234+
],
235+
"ag-grid:src/ts/rowModels/cache/rowNodeCache.ts": [
236+
116,
237+
208
238+
],
239+
"ag-grid:src/ts/rowModels/floatingRowModel.ts": [
240+
69,
241+
114,
242+
119
243+
],
244+
"ag-grid:src/ts/rowModels/inMemory/flattenStage.ts": [
245+
115
246+
],
247+
"ag-grid:src/ts/rowModels/inMemory/inMemoryNodeManager.ts": [
248+
80,
249+
143,
250+
146,
251+
183
252+
],
253+
"ag-grid:src/ts/rowModels/inMemory/inMemoryRowModel.ts": [
254+
308,
255+
377
256+
],
257+
"ag-grid:src/ts/rowModels/infinite/infiniteCache.ts": [
258+
95
259+
],
260+
"ag-grid:src/ts/rowNodes/filterService.ts": [
261+
16,
262+
28,
263+
55
264+
],
265+
"ag-grid:src/ts/rowNodes/sortService.ts": [
266+
30,
267+
86
268+
],
269+
"ag-grid:src/ts/selectionController.ts": [
270+
92
271+
],
272+
"ag-grid:src/ts/sortController.ts": [
273+
63,
274+
127
275+
],
276+
"ag-grid:src/ts/styling/stylingService.ts": [
277+
51
278+
],
279+
"ag-grid:src/ts/svgFactory.ts": [
280+
46,
281+
61,
282+
62
283+
],
284+
"ag-grid:src/ts/utils.ts": [
285+
202,
286+
269,
287+
456,
288+
546,
289+
568,
290+
574,
291+
726,
292+
876
293+
],
16294
"ag-grid:src/ts/widgets/component.ts": [
17295
55,
18296
84,
19-
111
297+
111,
298+
121,
299+
180
300+
],
301+
"ag-grid:src/ts/widgets/touchListener.ts": [
302+
109
303+
],
304+
"ag-grid:src/ts/xmlFactory.ts": [
305+
10,
306+
11,
307+
18,
308+
34
20309
]
21310
}

its/ruling/src/test/expected/angular.js/javascript-S7755.json

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

its/ruling/src/test/expected/paper.js/javascript-S7728.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"paper.js:gulp/tasks/build.js": [
3+
40
4+
],
5+
"paper.js:gulp/tasks/docs.js": [
6+
31
7+
],
8+
"paper.js:gulp/tasks/publish.js": [
9+
92
10+
],
211
"paper.js:gulp/typescript/typescript-definition-generator.js": [
312
14,
413
71,
@@ -7,7 +16,14 @@
716
"paper.js:gulp/utils/error.js": [
817
23
918
],
19+
"paper.js:src/core/Base.js": [
20+
326,
21+
421
22+
],
1023
"paper.js:src/core/PaperScript.js": [
1124
308
25+
],
26+
"paper.js:src/node/canvas.js": [
27+
60
1228
]
1329
}

0 commit comments

Comments
 (0)