When I use multiple --exclude directives inside of a COPY statement where each --exclude has it's own line, dockerfmt seems to inline them into one line.
I'd be nice if the newlines and backslashes are kept during formatting - actually am not really sure why this doesn't apply to COPY while it is enforced in RUN and ENV
Example:
COPY exclude=nginx-default.conf \
--exclude=zap-scan-automation-framework.yml \
--exclude=renovate.json5 \
--exclude=compose.yml \
--exclude=nginx.Dockerfile \
--exclude=Dockerfile \
--exclude=sonarqube-server.Dockerfile \
. .
# becomes
COPY --exclude=nginx-default.conf --exclude=zap-scan-automation-framework.yml -excl ude=renovate.json5 --exclude=compose.yml --exclude=nginx.Dockerfile --exclude=Dockerfile -exclude=sonarqube-server.Dockerfile . .
When I use multiple
--excludedirectives inside of aCOPYstatement where each--excludehas it's own line,dockerfmtseems to inline them into one line.I'd be nice if the newlines and backslashes are kept during formatting - actually am not really sure why this doesn't apply to
COPYwhile it is enforced inRUNandENVExample: