microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

Showing the red lines even the code is correct #188244

Closed jasthirajaram closed 1 year ago

jasthirajaram commented 1 year ago

Type: Bug

It is showing the red lines like error even there is no error and the code is running successfully. Please give the solution for the above issue.

VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz (4 x 2995)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.75GB (5.81GB free)| |Process Argv|--crash-reporter-id 26e6ce8c-5c36-4619-b6aa-4a1745c9cab4| |Screen Reader|no| |VM|0%|
Extensions (9) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|16.1.4 npm-intellisense|chr|1.4.4 vscode-eslint|dba|2.4.2 copilot|Git|1.97.270 angular-essentials|joh|16.0.4 Angular2|joh|16.0.1 live-server|ms-|0.4.9 material-icon-theme|PKi|4.29.0 LiveServer|rit|5.7.9 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30610678 3biah626:30602489 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 vsctsb:30748421 03d35959:30757346 7ij38806:30736111 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30785052 pythongtdpath:30769146 i26e3531:30792625 pythonnosm12tcf:30779713 pythonidxpt:30784022 pythonnoceb:30776495 h7j2d465:30786200 dsvsc013:30789517 ```
gjsjohnmurray commented 1 year ago

What language? Those red lines (formally Diagnostics) are contributed by extensions, and those extensions are also responsible for removing them when they not longer apply.

If the language you're seeing this with is implemented by an extension that isn't built in to VS Code you'll need to raise the issue with the extension author.