mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make the checks that detect if a docs snippet should compile a bit more robust against comments
This commit is contained in:
parent
8405d167c1
commit
8e67b28e0f
@ -517,15 +517,16 @@ SOLTMPDIR=$(mktemp -d)
|
||||
opts=()
|
||||
# We expect errors if explicitly stated, or if imports
|
||||
# are used (in the style guide)
|
||||
if grep -E "This will not compile|import \"" "$f" >/dev/null
|
||||
if grep -E "// This will not compile" "$f" >/dev/null ||
|
||||
sed -e 's|//.*||g' "$f" | grep -E "import \"" >/dev/null
|
||||
then
|
||||
opts=(--expect-errors)
|
||||
fi
|
||||
if grep "This will report a warning" "$f" >/dev/null
|
||||
if grep "// This will report a warning" "$f" >/dev/null
|
||||
then
|
||||
opts+=(--expect-warnings)
|
||||
fi
|
||||
if grep "This may report a warning" "$f" >/dev/null
|
||||
if grep "// This may report a warning" "$f" >/dev/null
|
||||
then
|
||||
opts+=(--ignore-warnings)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user