Skip to content
Snippets Groups Projects
Commit 4b73b3ec authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix \file detection for c style checker

parent 72e22a8d
No related branches found
No related tags found
No related merge requests found
......@@ -1356,11 +1356,15 @@ def scan_source(fp, code, args, fn):
elif tok.type in Token.Comment:
doxyfn = None
if "\\file" in tok.text:
doxyfn = tok.text.split("\\file", 1)[1].strip().split()[0]
doxyfn = tok.text.split("\\file", 1)[1]
elif "@file" in tok.text:
doxyfn = tok.text.split("@file", 1)[1].strip().split()[0]
doxyfn = tok.text.split("@file", 1)[1]
if doxyfn is not None:
doxyfn = doxyfn.lstrip(" \t")
# Blank file is acceptable in this case just ignore contents.
if not doxyfn.startswith("\n"):
doxyfn = doxyfn.split()[0]
doxyfn_base = os.path.basename(doxyfn)
if doxyfn_base != filepath_base:
warning(fn, "E151", "doxygen filename mismatch %s != %s" % (doxyfn_base, filepath_base), i, i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment