8000 bpo-36876: [c-analyzer tool] Tighten up the results and output. by ericsnowcurrently · Pull Request #23431 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36876: [c-analyzer tool] Tighten up the results and output. #23431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up "ignored" rows.
  • Loading branch information
ericsnowcurrently committed Nov 6, 2020
commit 4fcf1e02d9c1f317ecd0ea5c7cd63276bdd67abe
6 changes: 6 additions & 0 deletions Tools/c-analyzer/c_analyzer/datafiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ def read_ignored(infile, relroot=fsutil.USE_CWD):
def _iter_ignored(infile, relroot):
if relroot and relroot is not fsutil.USE_CWD:
relroot = os.path.abspath(relroot)
bogus = {_tables.EMPTY, _tables.UNKNOWN}
for row in _tables.read_table(infile, IGNORED_HEADER, sep='\t'):
*varidinfo, reason = row
if _tables.EMPTY in varidinfo or _tables.UNKNOWN in varidinfo:
varidinfo = tuple(None if v in bogus else v
for v in varidinfo)
if reason in bogus:
reason = None
varid = _info.DeclID.from_row(varidinfo)
varid = varid.fix_filename(relroot, formatted=False, fixroot=False)
yield varid, reason
Expand Down
0