Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 810afa7

Browse files
committedJan 4, 2024
nargo fmt script
1 parent 3048d08 commit 810afa7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
 

‎yarn-project/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"prepare:check": "node ./yarn-project-base/scripts/update_package_jsons.mjs --check && workspaces-to-typescript-project-references --check --tsconfigPath tsconfig.json",
88
"docs": "typedoc --out docs/dist && cd docs && yarn serve",
99
"formatting": "FORCE_COLOR=true yarn workspaces foreach -p -j unlimited -v run formatting",
10-
"formatting:fix": "FORCE_COLOR=true yarn workspaces foreach -p -v run formatting:fix",
10+
"formatting:fix": "FORCE_COLOR=true yarn workspaces foreach -p -v run formatting:fix && ./run_nargo_fmt.sh",
1111
"lint": "yarn eslint --cache --ignore-pattern l1-artifacts .",
1212
"format": "yarn prettier --cache -w .",
1313
"test": "FORCE_COLOR=true yarn workspaces foreach --exclude @aztec/aztec3-packages --exclude @aztec/end-to-end --exclude private-token -p -j unlimited -v run test",

‎yarn-project/run_nargo_fmt.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# Find all Nargo.toml files and run 'nargo fmt' in their directories
4+
find . -name "Nargo.toml" | while read file; do
5+
# Extract the directory from the file path
6+
dir=$(dirname "$file")
7+
8+
# Change into the directory
9+
cd "$dir" || exit
10+
11+
# Run 'nargo fmt' in the directory
12+
nargo fmt
13+
14+
# Change back to the original directory
15+
cd - > /dev/null
16+
done

0 commit comments

Comments
 (0)
Please sign in to comment.