@@ -19,12 +19,9 @@ by running::
19
19
20
20
The script can be run locally by providing the compiler output file
21
21
(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::
23
23
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
28
25
29
26
.. _warning-check-failure :
30
27
@@ -49,3 +46,21 @@ If a warning check fails with:
49
46
* Document in the PR that the change reduces the number of compiler
50
47
warnings. Decrement the count in the platform-specific warning
51
48
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.
0 commit comments