-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add rust buck tests * fix(api-keys): clippy * fix(api-keys): use rustfmt toml
- Loading branch information
1 parent
4d6f79f
commit cf2996c
Showing
23 changed files
with
486 additions
and
19 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
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 |
---|---|---|
|
@@ -12,3 +12,8 @@ pnpm_workspace( | |
], | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
export_file( | ||
name = "rustfmt.toml", | ||
visibility = ["PUBLIC"], | ||
) |
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 |
---|---|---|
|
@@ -86,7 +86,7 @@ eslint( | |
) | ||
|
||
test_suite( | ||
name = "test-unit", | ||
name = "test", | ||
tests = [ | ||
":audit", | ||
":lint", | ||
|
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 |
---|---|---|
|
@@ -81,7 +81,7 @@ eslint( | |
) | ||
|
||
test_suite( | ||
name = "test-unit", | ||
name = "test", | ||
tests = [ | ||
":audit", | ||
":lint", | ||
|
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 |
---|---|---|
|
@@ -86,7 +86,7 @@ eslint( | |
) | ||
|
||
test_suite( | ||
name = "test-unit", | ||
name = "test", | ||
tests = [ | ||
":audit", | ||
":lint", | ||
|
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
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
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 |
---|---|---|
|
@@ -201,7 +201,7 @@ jest_test( | |
) | ||
|
||
test_suite( | ||
name = "test-unit", | ||
name = "test", | ||
tests = [ | ||
":audit", | ||
":check-lint", | ||
|
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,2 @@ | ||
edition = "2021" | ||
newline_style = "Unix" |
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,14 @@ | ||
export_file( | ||
name = "clippy_output.py", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
export_file( | ||
name = "crate_context.py", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
export_file( | ||
name = "rustfmt_check.py", | ||
visibility = ["PUBLIC"], | ||
) |
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 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Prints output of a Clippy compilation and exits non-zero if appropriate. | ||
""" | ||
import argparse | ||
import os | ||
import sys | ||
|
||
|
||
def parse_args() -> argparse.Namespace: | ||
parser = argparse.ArgumentParser(description=__doc__) | ||
parser.add_argument( | ||
"clippy_txt", | ||
help="The file from a Clippy compilation with its output") | ||
|
||
return parser.parse_args() | ||
|
||
|
||
def main() -> int: | ||
args = parse_args() | ||
|
||
# If output is empty, there are no errors/warnings and we can exit `0` | ||
if os.path.getsize(args.clippy_txt) == 0: | ||
return 0 | ||
|
||
# Otherwise print output and exit non-zero | ||
with open(args.clippy_txt, encoding="utf-8") as f: | ||
print(f.read()) | ||
|
||
return 1 | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) | ||
|
Oops, something went wrong.