summaryrefslogtreecommitdiff
path: root/codegen/vulkan/scripts/ci/check_undefined
blob: b747b1dbd1484dcfab6d2fe6f97de9489475803a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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