Skip to content

Commit

Permalink
Fix #69 Handle one length argument on the last line
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Feb 11, 2020
1 parent 9950b4a commit a7b25af
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 @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
- do not append newline when printing out the output of `dockerfile-utils format` to the console ([#63](https://github.com/rcjsuen/dockerfile-utils/issues/63))
- allow paths to be quoted in WORKDIRs ([#67](https://github.com/rcjsuen/dockerfile-utils/issues/67))
- do not calculate edits for lines that are already formatted correctly ([#66](https://github.com/rcjsuen/dockerfile-utils/issues/66))
- allow an instruction with an argument on the last line to be parsed if it has no leading whitespace and has a length of one ([#69](https://github.com/rcjsuen/dockerfile-utils/issues/69))

## [0.0.13] - 2019-05-22
### 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.19",
"dockerfile-ast": "0.0.20",
"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 @@ -3728,6 +3728,12 @@ describe("Docker Validator Tests", function() {

diagnostics = validateDockerfile("FROM busybox\r\nRUN ls && \\\r\n");
assert.equal(diagnostics.length, 0);

diagnostics = validateDockerfile("FROM busybox\r\nRUN ls && \\\na");
assert.equal(diagnostics.length, 0);

diagnostics = validateDockerfile("FROM busybox\r\nRUN ls && \\\r\na");
assert.equal(diagnostics.length, 0);
});

it("whitespace newline escape", function() {
Expand Down

0 comments on commit a7b25af

Please sign in to comment.