rcjsuen / dockerfile-language-service

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
MIT License
16 stars 2 forks source link

Vertical selection and editing causes linter errors #51

Open bwateratmsft opened 4 years ago

bwateratmsft commented 4 years ago

Originally from @leventyalcin at https://github.com/microsoft/vscode-docker/issues/1297:

Hi,

I have made vertical line selection for repeating ARG statements and deleted the keywords in order to copy and paste them in a docker image and test something quickly instead building the whole image.

After copying the vars I've done redo with CMD+Z to the original state but that confused the linter.

What I'm seeing is irrelevant errors such as

failed to process ""v1.13.1"ARG": unexpected end of statement while looking for matching double-quotedockerfile-utils(36)

but the line actually looks like this

ARG KUBECTL_VERSION="v1.13.1"

or seeing this error

Unknown instruction: N_VERSION="V1.ARGARG17.3"dockerfile-utils(38)

for this line

ARG YARN_VERSION="v1.17.3"

If I delete all the ARG keyword and type it one by one, the linter error disappears (or reloading the file helps).

output

$ code --version 
1.38.1
b37e54c98e1a74ba89e03073e5a3761284e3ffb0
x64

$ sw_vers
ProductName:  Mac OS X
ProductVersion:   10.14.6
BuildVersion: 18G95

$ uname -o -i -m
x86_64 MacBookPro15,1 Darwin