7 Commits

Author SHA1 Message Date
Jeremy Leconte
89a552a5a3 Work around an issue with clang-include-cleaner.
Problem has been reported here:
https://github.com/llvm/llvm-project/issues/110843

Change-Id: Iaa578a17a724a80ea350db1494229c5af4c454b3
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364463
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43154}
2024-10-03 06:47:44 +00:00
Jeremy Leconte
3d60f2560e Fix gtest/gmock includes in apply-include-cleaner script.
gmock and gtest includes are replaced in the script but this wasn't applied to the 'CHECK_MODE' causing false error report.

nit: Usage is printed when no arguments are provided.

Change-Id: I418a17b998934b0079f5bf19513097481f35aa70
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42927}
2024-09-03 10:47:16 +00:00
Jeremy Leconte
c4d749304d Add some flags to 'apply-include-cleaner'.
-w allow to specify the working directory.
-c sets the exit code to 1 if there are changes to apply.

This flags are added so that the script can be running from a CQ bot.

Change-Id: I725a530b4dbbff26d4060435e90aaa66a75e572f
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360980
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42897}
2024-08-30 13:28:22 +00:00
Dor Hen
9c1ad5f8c0 [iwyu] Add postprocessing to handle gtest/gmock include paths
Unfortunately, clangd's include-cleaner has a smaller set of
customization features and does not allow us to set custom mappings for
certain include paths. Instead, add some postprocessing to our internal
wrapper on top of it (`apply-include-cleaner`) to handle gtest/gmock
include paths

Bug: webrtc:42226242
Change-Id: I65e4f73bb1b762bf2da1fb0f9a520bdd980b64bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359161
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#42774}
2024-08-13 15:33:26 +00:00
Florent Castelli
58cc8a4baa iwyu: Fix invocation of include-cleaner tool
The invocation is supposed to be at the project top-level and not from the build folder as it can otherwise hide Abseil headers.

Bug: webrtc:15874
Change-Id: Iaa481dce8dc08b0d2e66e9170627e8963f7c0db9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351120
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42359}
2024-05-21 09:53:08 +00:00
Harald Alvestrand
89dbc08f36 Use clang-include-cleaner from the llvm clangd package.
Also change the generation of compile_commands.json so that it
does not include reclient arguments.

Bug: webrtc:15874
Change-Id: I1bc2e7a8768a3467d31528d584f7e70d946a3301
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347900
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42110}
2024-04-18 09:51:07 +00:00
Harald Alvestrand
3997df3f28 Add an apply-include-cleaner tool
Since iwyu is now deprecated, we need to enable use of include-cleaner.
This approach gives some error messages when running, but does the job.

Bug: webrtc:15874
Change-Id: I431deef0f2e5ce99eb256a4d82aa32769ae58b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347642
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42085}
2024-04-16 13:17:03 +00:00