bin/find-unneeded-includes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit e57189f9c1c3a119e40f68a159056fd8c7660cad Author: Gabor Kelemen <[email protected]> AuthorDate: Wed Dec 31 13:23:19 2025 +0100 Commit: Gabor Kelemen <[email protected]> CommitDate: Sat Jan 3 14:26:42 2026 +0100 bin/find-unneeded-includes: improve headersfwd mode - give warning if a header is skipped because it contains #if defs - give an option to still check those (together with --noexclude) Change-Id: I9e878b213300a53b6236325f2bafb280f8b0290f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196396 Reviewed-by: Gabor Kelemen <[email protected]> Tested-by: Jenkins diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index b547ba6d5d13..3161b0ed907d 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -568,10 +568,11 @@ def tidy(compileCommands, paths, noexclude, checknamespaces, finderrors, removef p2 = subprocess.Popen(['grep', '-e', '#if'], stdin=p1.stdout, stdout=subprocess.PIPE, text=True) p1.stdout.close() output, _ = p2.communicate() - if not output: + if not output or noexclude: invocation = "include-what-you-use -Xiwyu --cxx17ns -Xiwyu --max_line_length=200 " + args else: # '#if' found, skipping file + print("WARNING: #if found in file:", path, "- skipping for now.") continue # In --fwdecl mode we ask for fw declaration removal suggestions.
