mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Merge remote branch 'remotes/origin/topic/jsiwek/doc-framework'
* remotes/origin/topic/jsiwek/doc-framework: Adding example documentation for a script's use of logging features. Adding &log attribute to static attr_names array. Small typo fix. Bro doc mode now tracks record redefs that extend its field list. BroBifDoc was unneeded; now dead code, so removed. Bro doc mode now only does a "shallow" copy of declared record types Bro's doc mode now terminates after processing bro_init but before net_run Fixes related to `make doc` handling of script summary text (##! comments) Overhaul of "doc" build target for generating policy script documentation. Add parser error hint when in doc mode about checking ## comment syntax. Move stuff related to policy script documentation from doc/ to doc/scripts/ Fixing example.bro's auto-reST generation baseline test.
This commit is contained in:
commit
5cd6394916
40 changed files with 752 additions and 422 deletions
|
@ -58,15 +58,8 @@ void BroDoc::AddImport(const std::string& s)
|
|||
|
||||
if ( ext_pos == std::string::npos )
|
||||
imports.push_back(s);
|
||||
|
||||
else
|
||||
{
|
||||
if ( s.substr(ext_pos + 1) == "bro" )
|
||||
imports.push_back(s.substr(0, ext_pos));
|
||||
else
|
||||
fprintf(stderr, "Warning: skipped documenting @load of file "
|
||||
"without .bro extension: %s\n", s.c_str());
|
||||
}
|
||||
imports.push_back(s.substr(0, ext_pos));
|
||||
}
|
||||
|
||||
void BroDoc::SetPacketFilter(const std::string& s)
|
||||
|
@ -116,7 +109,15 @@ void BroDoc::WriteDocFile() const
|
|||
if ( ! imports.empty() )
|
||||
{
|
||||
WriteToDoc(":Imports: ");
|
||||
WriteStringList(":doc:`%s`, ", ":doc:`%s`\n", imports);
|
||||
std::list<std::string>::const_iterator it;
|
||||
for ( it = imports.begin(); it != imports.end(); ++it )
|
||||
{
|
||||
if ( it != imports.begin() )
|
||||
WriteToDoc(", ");
|
||||
|
||||
WriteToDoc(":doc:`%s </policy/%s>`", it->c_str(), it->c_str());
|
||||
}
|
||||
WriteToDoc("\n");
|
||||
}
|
||||
|
||||
WriteToDoc("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue