-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linter: using a local in an assertion. (#723)
- Loading branch information
Showing
4 changed files
with
9 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
local input = [1,2,3], | ||
local knownItems = [1,2], | ||
local unknownItems = std.filter(function(i) !(i in knownItems), input), | ||
assert unknownItems == [] : "unexpected items: %s" % std.join(",",unknownItems) | ||
} |
Empty file.
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 |
---|---|---|
@@ -1,5 +0,0 @@ | ||
../testdata/local_in_object_assertion:1:9-15 Unused variable: x | ||
|
||
{ local x = 42, assert x == 42 } | ||
|
||
|
||