mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
for parse-only, only do script analysis if looking for usage issues
This commit is contained in:
parent
9a9995bdd1
commit
16bd121ea0
1 changed files with 8 additions and 3 deletions
|
@ -783,6 +783,14 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
}
|
||||
}
|
||||
|
||||
if ( options.parse_only )
|
||||
{
|
||||
if ( analysis_options.usage_issues > 0 )
|
||||
analyze_scripts();
|
||||
|
||||
exit(reporter->Errors() != 0);
|
||||
}
|
||||
|
||||
auto init_stmts = stmts ? analyze_global_stmts(stmts) : nullptr;
|
||||
|
||||
analyze_scripts();
|
||||
|
@ -791,9 +799,6 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
// This option is report-and-exit.
|
||||
exit(0);
|
||||
|
||||
if ( options.parse_only )
|
||||
exit(reporter->Errors() != 0);
|
||||
|
||||
if ( dns_type != DNS_PRIME )
|
||||
run_state::detail::init_run(options.interface, options.pcap_file, options.pcap_output_file, options.use_watchdog);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue