Merge pull request #13109 from sourabhxyz/develop

Fix commandline tests not detecting a snippet with a broken free function definition
This commit is contained in:
Mathias L. Baumann 2022-06-09 15:31:54 +02:00 committed by GitHub
commit cf1b9a5241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,6 @@ instead of library functions.
}
function contains(Data storage self, uint value)
public
view
returns (bool)
{

View File

@ -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