@@ -19,12 +19,9 @@ by running::
1919
2020The script can be run locally by providing the compiler output file
2121(where the output is saved) and the compiler output type
22- (either ``json `` or ``clang ``) to see a list of unique warnings::
22+ (either ``gcc `` or ``clang ``) to see a list of unique warnings::
2323
24- python Tools/build/check_warnings.py --compiler-output-file-path=compiler_output.txt --compiler-output-type=json
25-
26- ..note ::The ``-fdiagnostics-format=json`` flag is required when compiling with GCC
27- for the script to properly parse the compiler output.
24+ python Tools/build/check_warnings.py --compiler-output-file-path=compiler_output.txt --compiler-output-type=gcc
2825
2926.. _warning-check-failure :
3027
@@ -49,3 +46,21 @@ If a warning check fails with:
4946 * Document in the PR that the change reduces the number of compiler
5047 warnings. Decrement the count in the platform-specific warning
5148 ignore file or remove the file if the count is now zero.
49+
50+ .. _updating-warning-ignore-file :
51+
52+ Updating the warning ignore file
53+ --------------------------------
54+
55+ The warning ignore files can be found in the:cpy-file: `Tools/build/ ` directory.
56+ Both files and directories can be added to the ignore file. Files can have an explicit warning count or a wildcard count.
57+ Directories must be followed by a wildcard count. Wildcards indicate that 0 or more warnings will be ignored.
58+ The following is an example of the warning ignore file format::
59+
60+ Modules/_ctypes/_ctypes_test_generated.c.h *
61+ Objects/longobject.c 46
62+ Objects/methodobject.c 1
63+ Objects/mimalloc/ *
64+
65+ Using wildcards is reserved for code that is not maintained by CPython, or code that is for tests.
66+ Keep lines in warning ignore files sorted lexicographically.