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

Syntax highlighting for YAML literal scalars shows errors for otherwise invalid strings #54219

Closed
heaths opened this issue Jul 13, 2018 · 4 comments
Assignees
Labels
languages-basic Basic language support issues

Comments

@heaths
Copy link
Member

heaths commented Jul 13, 2018

Issue Type: Bug

When editing YAML - such as .vsts-ci.yml files, it's not uncommon to use a literal scalar like so:

testAssemblyVer2: |
  **\$(BuildConfiguration)\*mocks*.dll
  **\$(BuildConfiguration)\*test*.dll
  **\$(BuildConfiguration)\Win32\*test*.dll
  !**\obj\**

According to http://yaml.org/spec/1.2/spec.html#id2795688, any string therein should be literal and cannot be escaped; however, VSCode shows all strings having errors or otherwise incorrect. These cannot be quoted, or the quotes will - as spec'd - end up in the VSTS tasks (see screenshot).

image

VS Code version: Code 1.25.1 (1dfc5e5, 2018-07-11T15:43:53.668Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
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: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.92GB (24.08GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe .
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
vscode-sidebar Acr 1.0.0
xml Dot 2.3.1
vscode-guid hea 1.3.1
vscode-azurefunctions ms- 0.9.1
vscode-azurestorage ms- 0.4.0
vscode-cosmosdb ms- 0.8.0
python ms- 2018.6.0
azure-account ms- 0.4.1
cpptools ms- 0.17.6
csharp ms- 1.15.2
Go ms- 0.6.84
PowerShell ms- 1.8.1
team ms- 1.136.0
debugger-for-chrome msj 4.8.0
vscode-docker Pet 0.0.27
@heaths
Copy link
Member Author

heaths commented Jul 13, 2018

Folded blocks have a similar problem:

packagesToPush: >
  $(Build.SourcesDirectory)\**\*.nupkg;
  !**\*.symbols.nupkg;
  !**\packages\**\*.nupkg;

...yields:

image

@aeschli
Copy link
Contributor

aeschli commented Jul 17, 2018

marking as dup textmate/yaml.tmbundle#26

@aeschli aeschli closed this as completed Jul 17, 2018
@heaths
Copy link
Member Author

heaths commented Jul 17, 2018

@aeschli, how do you track insertion of syntax changes, or are any available in textmate's repos automatically transformed and inserted during VSCode build?

@aeschli
Copy link
Contributor

aeschli commented Jul 18, 2018

It's done manually. I update all grammars at least once every release. We have a script that reads the grammars from the original. The copy has additional properties to document what original commit the copy is from.
Just ping me anytime if you want me to update a particular grammar.

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
languages-basic Basic language support issues
Projects
None yet
Development

No branches or pull requests

3 participants