Add @deprecated directive

It emits a warning stating that the script is deprecated.
This commit is contained in:
Jon Siwek 2018-08-31 09:24:03 -05:00
parent 57a505b0e4
commit a467d0c92d
4 changed files with 46 additions and 0 deletions

View file

@ -27,6 +27,16 @@ executed. Directives are evaluated before script execution begins.
print "File:", @FILENAME;
.. bro:keyword:: @deprecated
Marks the current script as deprecated. This can be placed anywhere in
the script, but a good convention is to put it as the first line.
You can also supply additional comments.
Example::
@deprecated "Use '@load foo' instead"
.. bro:keyword:: @load
Loads the specified Bro script, specified as the relative pathname