-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix custom fmt test snapshots (#256)
`customLinterFmtTest`s were written originally to only have one path to snapshot, and they didn't interact nicely with other format tests. Fix the regex and the semantics to support multiple snapshots. This was breaking [`main` tests](https://github.com/trunk-io/plugins/actions/runs/4730053093/jobs/8404731644) and is a plugins release blocker. If need be, it should be straightforward to refine this in the future (as well as for `customLinterCheckTest`).
- Loading branch information
1 parent
f6ffcc3
commit 60112d2
Showing
20 changed files
with
115 additions
and
162 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
File renamed without changes.
File renamed without changes.
39 changes: 0 additions & 39 deletions
39
linters/buildifier/test_data/buildifier_v6.1.0_add_tables.check.shot
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
linters/buildifier/test_data/buildifier_v6.1.0_add_tables.fmt.shot
This file was deleted.
Oops, something went wrong.
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
13 changes: 2 additions & 11 deletions
13
...est_data/buildifier_v6.1.0_basic.fmt.shot → ...onfig.test_data.add_tables.BUILD.fmt.shot
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
10 changes: 10 additions & 0 deletions
10
linters/buildifier/test_data/buildifier_v6.1.0_no_config.test_data.basic.bzl.fmt.shot
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,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Testing formatter buildifier test no_config 1`] = ` | ||
"# Misformatted file | ||
def eponymous_name(): | ||
name = native.package_name() | ||
|
||
return name[name.rfind("/") + 1:] | ||
" | ||
`; |
35 changes: 35 additions & 0 deletions
35
...rs/buildifier/test_data/buildifier_v6.1.0_with_config.test_data.add_tables.BUILD.fmt.shot
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,35 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Testing formatter buildifier test with_config 1`] = ` | ||
"foo_macro( | ||
fizz = [ | ||
":lib1", | ||
":lib2", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "files", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
sh_library( | ||
name = "lib1", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_library( | ||
name = "lib2", | ||
srcs = ["src1.sh"], | ||
) | ||
|
||
sh_binary( | ||
name = "foo", | ||
srcs = ["foo.sh"], | ||
deps = [ | ||
":lib1", | ||
":lib2", | ||
], | ||
) | ||
" | ||
`; |
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...bocop_v1.39.0_test_data.basic.rb.fmt.shot → ...v1.39.0_basic.test_data.basic.rb.fmt.shot
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
2 changes: 1 addition & 1 deletion
2
.../rufo_v0.13.0_test_data.basic.rb.fmt.shot → ...v0.13.0_basic.test_data.basic.rb.fmt.shot
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
2 changes: 1 addition & 1 deletion
2
...on_v2.1.0_test_data.package.json.fmt.shot → ...1.0_basic.test_data.package.json.fmt.shot
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
2 changes: 1 addition & 1 deletion
2
...at_v0.50.0_test_data.basic.swift.fmt.shot → ...50.0_basic.test_data.basic.swift.fmt.shot
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
Oops, something went wrong.