Skip to content

Commit 103c650

Browse files
committed
feat: script working around forge doc failing on custom natspec tags
1 parent 62cf97e commit 103c650

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

contracts/scripts/serveDoc.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4+
5+
# Remove unsupported natspec tags
6+
# Known issue: https://github.com/foundry-rs/foundry/issues/4118
7+
for tag in authors reviewers auditors bounties deployments tools
8+
do
9+
find $SCRIPT_DIR/../src/ -type f -name '*.sol' | xargs sed -i '' "/^.*@$tag.*$/d"
10+
done
11+
12+
echo "Use 'git restore src/' to revert the changes"
13+
14+
forge doc --serve
15+

0 commit comments

Comments
 (0)