Allow --parse-only to work with --usage-issues flag

Use of --parse-only would previously exit before --usage-issues had a
chance to analyze scripts and report any discovered issues and it can be
useful to combine both flags for checking scripts for mistakes without
actually executing any code.

This also improves the behavior of --parse-only in combination with
reporting problems in signature files (previously, it exited before
even reading them).
This commit is contained in:
Jon Siwek 2021-02-05 14:46:47 -08:00
parent 91dc6fbbb0
commit ac0b09d1a4
6 changed files with 34 additions and 6 deletions

View file

@ -0,0 +1,9 @@
# @TEST-DOC: ``zeek -a -u`` should detect usage issues without executing code
# @TEST-EXEC: zeek -b -a -u %INPUT >out 2>&1
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
event zeek_init()
{
local a: count;
print a;
}