dprint / dprint-plugin-dockerfile

Dockerfile code formatting plugin for dprint.
https://dprint.dev/plugins/dockerfile
MIT License
6 stars 1 forks source link

Could not parse `RUN` with heredocs #15

Open Jisu-Woniu opened 2 months ago

Jisu-Woniu commented 2 months ago

Describe the bug

format error

dprint-plugin-dockerfile version: 0.3.2

Input Code

RUN <<EOF
echo Hello
echo World
EOF

Expected Output

dprint should parse this file successfully, since it is a legal Dockerfile according to Dockerfile reference.

Actual Output

Error formatting **/Dockerfile. Message: could not parse Dockerfile:  --> 4:4
  |
4 | EOF␊
  |    ^---
  |
  = expected any_breakable
Had 1 error formatting.
Jisu-Woniu commented 2 months ago

This is the dprint.json if it is relavant:

dprint.json

{
  "dockerfile": {
  },
  "excludes": [],
  "plugins": [
    "https://plugins.dprint.dev/dockerfile-0.3.2.wasm"
  ]
}