mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Merge branch 'topic/christian/zeekygen-parse-only'
* topic/christian/zeekygen-parse-only: Fix a typo. Update NEWS for Zeekygen parse-only change. Remove adjustments and custom terminate() for Zeekygen invocation. Suppress warnings on deprecated DPD scripts during Zeekygen Stop suppressing stdout during Zeekygen docs generation Make Zeekygen docs generation (-X) imply parse-only (-a)
This commit is contained in:
commit
b95f1b0925
9 changed files with 26 additions and 21 deletions
|
@ -133,7 +133,7 @@ void usage(const char* prog) {
|
|||
printf(" -T|--re-level <level> | set 'RE_level' for rules\n");
|
||||
printf(" -U|--status-file <file> | Record process status in file\n");
|
||||
printf(" -W|--watchdog | activate watchdog timer\n");
|
||||
printf(" -X|--zeekygen <cfgfile> | generate documentation based on config file\n");
|
||||
printf(" -X|--zeekygen <cfgfile> | generate documentation based on config file; implies -a\n");
|
||||
|
||||
#ifdef USE_PERFTOOLS_DEBUG
|
||||
printf(" -m|--mem-leaks | show leaks [perftools]\n");
|
||||
|
|
|
@ -641,6 +641,10 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
auto zeekygen_cfg = options.zeekygen_config_file.value_or("");
|
||||
zeekygen_mgr = new zeekygen::detail::Manager(zeekygen_cfg, zeek_argv[0]);
|
||||
|
||||
// Zeekygen documentation generation (via -X) implies we only parse:
|
||||
if ( ! zeekygen_cfg.empty() )
|
||||
detail::parse_only = true;
|
||||
|
||||
add_essential_input_file("base/init-bare.zeek");
|
||||
add_essential_input_file("builtin-plugins/__preload__.zeek");
|
||||
add_essential_input_file("base/init-frameworks-and-bifs.zeek");
|
||||
|
@ -985,7 +989,7 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( options.parse_only ) {
|
||||
if ( detail::parse_only ) {
|
||||
if ( analysis_options.usage_issues > 0 )
|
||||
analyze_scripts(options.no_unused_warnings);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue