Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support heredocs in the formatter for COPY instructions #111

Closed
rcjsuen opened this issue Aug 2, 2022 · 2 comments
Closed

Support heredocs in the formatter for COPY instructions #111

rcjsuen opened this issue Aug 2, 2022 · 2 comments
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 2, 2022

# syntax=docker/dockerfile:1
FROM alpine
COPY <<-EOT /test.txt
	hello
EOT
const lib = require("dockerfile-utils");
const content = `# syntax=docker/dockerfile:1
FROM alpine
COPY <<-EOT /test.txt
	hello
EOT`;
const edits = lib.format(content);
console.log(edits.length);
1

We should update the formatter to consider heredocs in COPY instructions.

@rcjsuen rcjsuen self-assigned this Aug 2, 2022
@hgl
Copy link

hgl commented Oct 29, 2022

Thanks for the fix. Would it be possible for this change to trickle down to dockerfile-language-server-nodejs?

@rcjsuen
Copy link
Owner Author

rcjsuen commented May 28, 2023

Thanks for the fix. Would it be possible for this change to trickle down to dockerfile-language-server-nodejs?

when will be published now?very preciate

I have just released a new version of dockerfile-language-server-nodejs (0.10.0) today with this fix. Sorry for the long delay but I have been distracted with other things so I could not get a chance to get this out sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants