mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
docs: c_lex: setup a logger to report tokenizer issues
Report file that has issues detected via CMatch and CTokenizer. This is done by setting up a logger that will be overriden by kdoc_parser, when used on it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <903ad83ae176196a50444e66177a4f5bcdef5199.1773770483.git.mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Jonathan Corbet
parent
2f07ddbd57
commit
024e200e2a
@@ -13,7 +13,7 @@ import sys
|
||||
import re
|
||||
from pprint import pformat
|
||||
|
||||
from kdoc.c_lex import CTokenizer
|
||||
from kdoc.c_lex import CTokenizer, tokenizer_set_log
|
||||
from kdoc.kdoc_re import KernRe
|
||||
from kdoc.kdoc_item import KdocItem
|
||||
|
||||
@@ -253,6 +253,8 @@ class KernelDoc:
|
||||
self.config = config
|
||||
self.xforms = xforms
|
||||
|
||||
tokenizer_set_log(self.config.log, f"{self.fname}: CMatch: ")
|
||||
|
||||
# Initial state for the state machines
|
||||
self.state = state.NORMAL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user