diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-11 17:32:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-12 09:06:44 +0200 |
commit | 5fe2c43a94c6d90090809c08e39af58a44974c26 (patch) | |
tree | 7c7ef544d01eed458b95518915e0958327ca5eb1 /bin | |
parent | 9b7ee5a05524b3c80258be6a0f6c5b496942d1f2 (diff) |
IWYU: ignore UNO include files, similar to how the clang loplugin does
Otherwise we could break some external code for no good reason.
Change-Id: I01b1e266425688d3d4b5293c0f8609d78c6b7f2f
Reviewed-on: https://gerrit.libreoffice.org/60331
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find-unneeded-includes | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 2e3d15f2230c..e912a9155c82 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -179,6 +179,19 @@ def run_tool(task_queue, failed_files): task_queue.task_done() +def isInUnoIncludeFile(path): + return path.startswith("include/com/") \ + or path.startswith("include/cppu/") \ + or path.startswith("include/cppuhelper/") \ + or path.startswith("include/osl/") \ + or path.startswith("include/rtl/") \ + or path.startswith("include/sal/") \ + or path.startswith("include/salhelper/") \ + or path.startswith("include/systools/") \ + or path.startswith("include/typelib/") \ + or path.startswith("include/uno/") + + def tidy(compileCommands, paths): return_code = 0 try: @@ -191,6 +204,9 @@ def tidy(compileCommands, paths): t.start() for path in sorted(paths): + if isInUnoIncludeFile(path): + continue + moduleName = path.split("/")[0] rulePath = os.path.join(moduleName, "IwyuFilter_" + moduleName + ".yaml") |