Skip to content

Commit

Permalink
Make an exception for including stdarg.h in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Jun 3, 2023
1 parent 5248bae commit bab5e33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/no-includes.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/usr/bin/env bash

# Don't allow any system include directives in tests.
#
# We make an exception for stdarg.h which is used for
# the wrapped va_list feature. stdarg.h is available since C89
# therefor not having this header is a sign of a bigger issue.

set -eu
cd "$(dirname "$0")/.."

echo "Checking for #include directives of system headers..."

grep -rn '#include\s*<.*>' bindgen-tests/tests/headers || {
grep -rn '#include\s*<(?!stdarg).*>' bindgen-tests/tests/headers || {
echo "Found none; OK!"
exit 0
}
Expand Down

0 comments on commit bab5e33

Please sign in to comment.