mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-36876: [c-analyzer tool] Tighten up the results and output. (GH-23431)
We also update the "ignored" file with a temporary list of all known globals.
This commit is contained in:
parent
a993e901eb
commit
9f02b479e6
13 changed files with 3203 additions and 110 deletions
|
|
@ -105,7 +105,11 @@ def cmd_parse(filenames=None, **kwargs):
|
|||
filenames = _resolve_filenames(filenames)
|
||||
if 'get_file_preprocessor' not in kwargs:
|
||||
kwargs['get_file_preprocessor'] = _parser.get_preprocessor()
|
||||
c_parser.cmd_parse(filenames, **kwargs)
|
||||
c_parser.cmd_parse(
|
||||
filenames,
|
||||
relroot=REPO_ROOT,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
||||
def _cli_check(parser, **kwargs):
|
||||
|
|
@ -131,6 +135,7 @@ def cmd_analyze(filenames=None, **kwargs):
|
|||
kwargs['get_file_preprocessor'] = _parser.get_preprocessor(log_err=print)
|
||||
c_analyzer.cmd_analyze(
|
||||
filenames,
|
||||
relroot=REPO_ROOT,
|
||||
_analyze=_analyzer.analyze,
|
||||
formats=formats,
|
||||
**kwargs
|
||||
|
|
|
|||
|
|
@ -84,13 +84,13 @@ def write_known():
|
|||
|
||||
def read_ignored():
|
||||
if not _IGNORED:
|
||||
_IGNORED.update(_datafiles.read_ignored(IGNORED_FILE))
|
||||
_IGNORED.update(_datafiles.read_ignored(IGNORED_FILE, relroot=REPO_ROOT))
|
||||
return dict(_IGNORED)
|
||||
|
||||
|
||||
def write_ignored():
|
||||
raise NotImplementedError
|
||||
datafiles.write_ignored(variables, IGNORED_FILE)
|
||||
_datafiles.write_ignored(variables, IGNORED_FILE, relroot=REPO_ROOT)
|
||||
|
||||
|
||||
def analyze(filenames, *,
|
||||
|
|
|
|||
|
|
@ -162,6 +162,12 @@ Modules/_datetimemodule.c Py_BUILD_CORE 1
|
|||
Modules/_ctypes/cfield.c Py_BUILD_CORE 1
|
||||
Modules/_heapqmodule.c Py_BUILD_CORE 1
|
||||
Modules/_posixsubprocess.c Py_BUILD_CORE 1
|
||||
Modules/_sre.c Py_BUILD_CORE 1
|
||||
Modules/_collectionsmodule.c Py_BUILD_CORE 1
|
||||
Modules/_zoneinfo.c Py_BUILD_CORE 1
|
||||
Modules/unicodedata.c Py_BUILD_CORE 1
|
||||
Modules/_cursesmodule.c Py_BUILD_CORE 1
|
||||
Modules/_ctypes/_ctypes.c Py_BUILD_CORE 1
|
||||
Objects/stringlib/codecs.h Py_BUILD_CORE 1
|
||||
Python/ceval_gil.h Py_BUILD_CORE 1
|
||||
Python/condvar.h Py_BUILD_CORE 1
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue