Skip to content

Commit

Permalink
docs: fail to build bnf if not all files are declared in OUTS
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
rickystewart committed Jul 20, 2022
1 parent 83a42c8 commit 099882e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/generated/sql/bnf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ genrule(
outs = [file + ".bnf" for file in FILES],
cmd = """
$(location //pkg/cmd/docgen) grammar bnf $(RULEDIR) --quiet --addr $(location //pkg/sql/parser:sql.y)
for FILE in $$(ls $(RULEDIR))
do
if [[ "$(OUTS)" != *"$$FILE"* ]]; then
echo "$$FILE is not a generated file; please add $${FILE%.bnf} to the list of FILES in docs/generated/sql/bnf/BUILD.bazel"
exit 1
fi
done
""",
exec_tools = ["//pkg/cmd/docgen"],
visibility = [
Expand Down

0 comments on commit 099882e

Please sign in to comment.