We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the Dockerfile below, the extra continuation newlines and comments should be ignored.
FROM alpine RUN echo \ # comment # comment "Hello"
$ docker build . Sending build context to Docker daemon 38.15MB [WARNING]: Empty continuation line found in: RUN echo "Hello" [WARNING]: Empty continuation lines will become errors in a future release. Step 1/2 : FROM alpine latest: Pulling from library/alpine c9b1b535fdd9: Pull complete Digest: sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d Status: Downloaded newer image for alpine:latest ---> e7d92cdc71fe Step 2/2 : RUN echo "Hello" ---> Running in 5a49db1abc9d Hello Removing intermediate container 5a49db1abc9d ---> 60a307c69178 Successfully built 60a307c69178
However, it appears to be confusing the parser and it thinks there are four arguments when there are only two.
import { DockerfileParser } from 'dockerfile-ast'; let content = "FROM alpine\n" + "RUN echo \\\n" + "# comment\n" + "\n" + "# comment\n" + "\"Hello\""; let dockerfile = DockerfileParser.parse( content ); let instruction = dockerfile.getInstructions()[1]; for (const a of instruction.getArguments()) { console.log(a); }
Argument { value: 'echo', range: { start: { line: 1, character: 4 }, end: { line: 1, character: 8 } } } Argument { value: '#', range: { start: { line: 4, character: 0 }, end: { line: 4, character: 1 } } } Argument { value: 'comment', range: { start: { line: 4, character: 2 }, end: { line: 4, character: 9 } } } Argument { value: '"Hello"', range: { start: { line: 5, character: 0 }, end: { line: 5, character: 7 } } }
The text was updated successfully, but these errors were encountered:
From further testing, it looks like one comment is okay but multiple comments become a problem.
Sorry, something went wrong.
6fcc611
rcjsuen
No branches or pull requests
Given the Dockerfile below, the extra continuation newlines and comments should be ignored.
However, it appears to be confusing the parser and it thinks there are four arguments when there are only two.
The text was updated successfully, but these errors were encountered: