We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dba9471 commit cf8ca5eCopy full SHA for cf8ca5e
.devcontainer/cargo_snippet.sh
@@ -5,6 +5,13 @@
5
# Navigate to the lib directory within the workspace folder
6
cd $WORKSPACE_FOLDER/src/lib
7
8
+# Run the tests silently. Exit with an error if tests fail.
9
+if ! cargo test &>/dev/null; then
10
+ echo "Error: Tests failed."
11
+ exit 1
12
+fi
13
+
14
# Generate Rust code snippets using cargo-snippet, then modify the output using sed to add a scope for Rust,
15
# and finally, save the modified output to a rust.code-snippets file in the .vscode directory of the workspace folder
16
cargo snippet -t vscode | sed -r "s/\"prefix\"/\"scope\": \"rust\",\n \"prefix\"/" > $WORKSPACE_FOLDER/.vscode/rust.code-snippets
17
+echo "Snippets generated."
0 commit comments