Skip to content

Commit

Permalink
Fix #74 Ignore escape character in embedded comments
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Mar 8, 2020
1 parent 754e10d commit 348ba56
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
- instruction keywords that span multiple lines will no longer be raised as an error ([#72](https://github.com/rcjsuen/dockerfile-utils/issues/72))
- embedded comments with an empty continuation line will no longer be raised as an error ([#73](https://github.com/rcjsuen/dockerfile-utils/issues/73))
- arguments that follow a non-leading `#` comment marker will no longer be dropped during validation ([#75](https://github.com/rcjsuen/dockerfile-utils/issues/75))
- fix parsing of embedded comments in multiline instructions that have a trailing escape character ([#74](https://github.com/rcjsuen/dockerfile-utils/issues/74))

## [0.0.14] - 2020-02-11
### Added
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"main": "./lib/main.js",
"types": "./lib/main.d.ts",
"dependencies": {
"dockerfile-ast": "0.0.23",
"dockerfile-ast": "0.0.24",
"vscode-languageserver-types": "3.6.0"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions test/dockerValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,12 @@ describe("Docker Validator Tests", function() {

diagnostics = validateDockerfile("FROM alpine \\\r\n# comment\\\r\nAS build");
assert.equal(diagnostics.length, 0);

diagnostics = validateDockerfile("FROM alpine AS \\\n# comment\\\nbuild");
assert.equal(diagnostics.length, 0);

diagnostics = validateDockerfile("FROM alpine AS \\\r\n# comment\\\r\nbuild");
assert.equal(diagnostics.length, 0);
});

it("invalid as", function() {
Expand Down

0 comments on commit 348ba56

Please sign in to comment.