mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 15:17:01 -04:00
Warn about statements not found in the grammar
This commit is contained in:
parent
cbad1803a5
commit
ebe6ede2ec
1 changed files with 16 additions and 1 deletions
|
|
@ -216,12 +216,15 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
|
|||
location=(new["docname"], new["lineno"]),
|
||||
)
|
||||
|
||||
def get_statement_name(self, signature):
|
||||
return "{}.{}.{}".format(domainname, "statement", signature)
|
||||
|
||||
def add_statement(self, signature, tags, short, lineno):
|
||||
"""
|
||||
Add a new statement to the domain data structures.
|
||||
No visible effect.
|
||||
"""
|
||||
name = "{}.{}.{}".format(domainname, "statement", signature)
|
||||
name = self.get_statement_name(signature)
|
||||
anchor = "{}-statement-{}".format(domainname, signature)
|
||||
|
||||
new = {
|
||||
|
|
@ -291,6 +294,18 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
|
|||
domainlabel,
|
||||
)
|
||||
|
||||
extra_statement_sigs = defined_statements.difference(statements_in_grammar)
|
||||
for extra in extra_statement_sigs:
|
||||
fullname = self.get_statement_name(extra)
|
||||
desc = self.data["statements"][fullname]
|
||||
logger.warning(
|
||||
".. statement:: %s found but matching definition in %s grammar is"
|
||||
" missing",
|
||||
extra,
|
||||
domainlabel,
|
||||
location=(desc["docname"], desc["lineno"]),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def process_statementlist_nodes(cls, app, doctree, fromdocname):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue