Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell comment syntax highlight is not correct. #69771

Closed
stefanita-mitran opened this issue Mar 4, 2019 · 2 comments
Closed

PowerShell comment syntax highlight is not correct. #69771

stefanita-mitran opened this issue Mar 4, 2019 · 2 comments
Assignees

Comments

@stefanita-mitran
Copy link

We have written the needed data into your clipboa
Issue Type: Bug

The highlight syntax for comments is wrong for PowerShell files.
EG.

.\procedure.ps1 `
   -arg1 $variableforarg1 ` #this syntax highlighting should not resemble a comment
   -arg2 $variableforarg2 ` <#this syntax highlight should not resemble a comment because it's invalid to add a comment here #>
   -arg3 $variableforarg3 <#this syntax higlight should be correct#>`
   -arg4 $variableforarg4

The example above shows that the "arg1" and "arg2" have incorrect comments and should not by syntax higlighted as comments.

For me saddly as a beginner powershell user this was an issue when trying to deploy :(. Just want to make that you have a visual cues when using this and not commit a faulty powershell script in production like me.
P.S. if you use the PowerShell ISE it will syntax highlight correctly.

VS Code version: Code 1.31.1 (1b8e830, 2019-02-12T02:20:54.427Z)
OS version: Windows_NT x64 10.0.16299

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.89GB (15.24GB free)
Process Argv C:\Users\stem\Documents\Repos\track-system\TrackServices\Database\schema\58_upgrade_from_v57_to_v58.sql
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
EditorConfig Edi 0.13.0
gc-excelviewer Gra 2.1.29
prettify-json moh 0.0.3
mssql ms- 1.4.0
csharp ms- 1.17.1
PowerShell ms- 1.11.0
vetur oct 0.16.2
rd because it was too large to send. Please paste.
@aeschli aeschli assigned alexr00 and unassigned aeschli Mar 4, 2019
@alexr00
Copy link
Member

alexr00 commented Mar 6, 2019

@stefanita-mitran I can reproduce this, but it also occurs in PowerShell ISE. I'll move this issue to the owners of the PowerShell grammar.

@alexr00
Copy link
Member

alexr00 commented Mar 6, 2019

This issue was moved to PowerShell/EditorSyntax#161

@alexr00 alexr00 closed this as completed Mar 6, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants