-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dlint): avoid panic when no trailing new line is appended (#1149)
This commit prevents dlint from panicking when the input file doesn't contain a final newline character. Towards #1145
- Loading branch information
1 parent
3454c10
commit cffdc91
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
no-unused-vars | ||
|
||
x `base` is never used | ||
,-[issue1145_no_trailing_newline.ts:3:5] | ||
3 | ---*/ | ||
4 | var base | ||
: ^^|^ | ||
: `-- If this is intentional, prefix it with an underscore like `_base` | ||
`---- | ||
help: https://lint.deno.land/#no-unused-vars | ||
|
||
no-var | ||
|
||
x `var` keyword is not allowed. | ||
,-[issue1145_no_trailing_newline.ts:3:1] | ||
3 | ---*/ | ||
4 | var base | ||
: ^^^^^^^^ | ||
`---- | ||
help: https://lint.deno.land/#no-var | ||
|
||
Found 2 problems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/*--- | ||
---*/ | ||
var base |