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

Parse heredoc syntax for ADD and COPY when calculating completion items #90

Closed
rcjsuen opened this issue Aug 31, 2021 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 31, 2021

There is still the file2 heredoc to process so we should not be prompting any completion items. We should include ADD and COPY in our heredoc support.

ADD a.txt <<file b.txt <<file2 /destination/
abc
file
COPY a.txt <<file b.txt <<file2 /destination/
abc
file
const lib = require("dockerfile-language-service");
const service = lib.DockerfileLanguageServiceFactory.createLanguageService();
console.log(service.computeCompletionItems("ADD a.txt <<file b.txt <<file2 /destination/\nabc\nfile\n", { line: 3, character: 0 }).length);
console.log(service.computeCompletionItems("COPY a.txt <<file b.txt <<file2 /destination/\nabc\nfile\n", { line: 3, character: 0 }).length);
19
19
@rcjsuen rcjsuen added the enhancement New feature or request label Aug 31, 2021
@rcjsuen rcjsuen self-assigned this Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant