camdencheek / tree-sitter-dockerfile

A tree-sitter grammar for Dockerfile
MIT License
71 stars 20 forks source link

ADD and COPY should support more than one parameter #43

Closed EricCrosson closed 11 months ago

EricCrosson commented 11 months ago

The dockerfile reference shows examples of both ADD and COPY taking multiple parameters:

ADD --chown=myuser:mygroup --chmod=655 files* /somedir/
COPY --chown=myuser:mygroup --chmod=644 files* /somedir/

However, the implementation of add_instruction and copy_instruction both only permit zero or one parameters:

https://github.com/camdencheek/tree-sitter-dockerfile/blob/1800d5a06789797065ba5e7d80712b6bbf5483d7/grammar.js#L73-L91