diff options
Diffstat (limited to 'codegen/vulkan/scripts/ci/check_undefined')
-rwxr-xr-x | codegen/vulkan/scripts/ci/check_undefined | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/codegen/vulkan/scripts/ci/check_undefined b/codegen/vulkan/scripts/ci/check_undefined new file mode 100755 index 00000000..b747b1db --- /dev/null +++ b/codegen/vulkan/scripts/ci/check_undefined @@ -0,0 +1,22 @@ +#!/bin/bash + +# Copyright 2020-2021 The Khronos Group, Inc. +# SPDX-License-Identifier: Apache-2.0 + +# scripts/ci/check_undefined +# Check for non-tagged 'undefined' in spec sources. +# Skip appendices/VK* files, which are non-normative. +# Ideally we would skip NOTES too, but that would require parsing. + +undefined=/tmp/undefined +ls chapters/*txt chapters/*/*txt appendices/[A-UW-Za-z]*txt | \ + xargs egrep -E '(^|[[:space:]])undefined($|[^:])' > $undefined +if test `cat $undefined | wc -l` -gt 0 ; then + echo "*** Found un-tagged uses of 'undefined'" + cat $undefined + rm $undefined + exit 1 +else + rm $undefined + exit 0 +fi |