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

Variable names should be alphanumeric or contain underscores #49

Closed rcjsuen closed 5 years ago

rcjsuen commented 5 years ago

Variable names can only contain alphanumeric or underscore characters

FROM alpine
ENV var value
RUN echo $var:test
FROM alpine
ENV var_ value
RUN echo $var_:test

In the two Dockerfiles above, if we put the cursor in the variable within the RUN instruction, our variable highlighting, renaming, and definition lookup features will not work. This is because the system will think the variable's name is var:test or var_:test instead of simply var and var_.

rcjsuen commented 5 years ago

This would also affect our hover support because then it means it won't resolve to the correct variable name.