Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit22bfaed

Browse files
nohlsonhugovk
andauthored
Warning ignore file modification guidance for check warning tooling (#1399)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parentd493655 commit22bfaed

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

‎development-tools/warnings.rst‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ by running::
1919

2020
The 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.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp