https://github.com/python/cpython/commit/5ab9604683a58e613c6eba309ed89ed2092e3e2d
commit: 5ab9604683a58e613c6eba309ed89ed2092e3e2d
branch: main
author: Irit Katriel <[email protected]>
committer: iritkatriel <[email protected]>
date: 2025-01-30T11:38:52Z
summary:
clearer error and suggestion when c-analyzer cannot read ignored.tsv (#129423)
files:
M Tools/c-analyzer/c_analyzer/datafiles.py
diff --git a/Tools/c-analyzer/c_analyzer/datafiles.py
b/Tools/c-analyzer/c_analyzer/datafiles.py
index d5db3bd3ed74ac..79c201a5d3b92c 100644
--- a/Tools/c-analyzer/c_analyzer/datafiles.py
+++ b/Tools/c-analyzer/c_analyzer/datafiles.py
@@ -104,7 +104,12 @@ def _iter_ignored(infile, relroot):
for v in varidinfo)
if reason in bogus:
reason = None
- varid = _info.DeclID.from_row(varidinfo)
+ try:
+ varid = _info.DeclID.from_row(varidinfo)
+ except BaseException as e:
+ e.add_note(f"Error occurred when processing row {varidinfo} in
{infile}.")
+ e.add_note(f"Could it be that you added a row which is not
tab-delimited?")
+ raise e
varid = varid.fix_filename(relroot, formatted=False, fixroot=False)
yield varid, reason
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]