-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable checking headers with Clang Tidy. #46009
Enable checking headers with Clang Tidy. #46009
Conversation
5a96a00
to
f3376d2
Compare
I need to revert the CI script but I wanted to show the CI logs as-is as part of the review! |
Sorry, I'm a little confused about the state we're in. In the CI logs, it doesn't look like there are any lints reported in header files. Does that mean that they're all fixed already? |
Yup. It took about 20 PRs but we are (currently) green as far as we can tell. |
Whoa. That's awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ noted cleanup.
Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
…135319) flutter/engine@ef9ceed...92be04f 2023-09-22 skia-flutter-autoroll@skia.org Roll Skia from 8beae2053939 to fe73688dc40f (1 revision) (flutter/engine#46202) 2023-09-22 matanlurey@users.noreply.github.com Enable checking headers with Clang Tidy. (flutter/engine#46009) 2023-09-22 skia-flutter-autoroll@skia.org Roll Skia from f346a813ffd4 to 8beae2053939 (5 revisions) (flutter/engine#46200) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#135319) flutter/engine@ef9ceed...92be04f 2023-09-22 skia-flutter-autoroll@skia.org Roll Skia from 8beae2053939 to fe73688dc40f (1 revision) (flutter/engine#46202) 2023-09-22 matanlurey@users.noreply.github.com Enable checking headers with Clang Tidy. (flutter/engine#46009) 2023-09-22 skia-flutter-autoroll@skia.org Roll Skia from f346a813ffd4 to 8beae2053939 (5 revisions) (flutter/engine#46200) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Closes flutter/flutter#134969. Turns out this was literally 1 line. Tested locally: ```shell dart tools/clang_tidy/bin/main.dart \ --target-variant host_debug_unopt_arm64 \ --lint-all \ --checks="-*,llvm-header-guard" ``` <details> <summary>Local Test Results</summary> Here is a tiny snippet showing this is indeed doing something: ```txt [0:02] Jobs: 0% done, 0/1033 completed, 7 in progress, 1019 pending, 7 failed. ❌ Failures for clang-tidy on /Users/matanl/Developer/engine/src/flutter/display_list/dl_blend_mode.cc: ../../flutter/display_list/dl_blend_mode.h:5:9: error: header guard does not follow preferred style [llvm-header-guard,-warnings-as-errors] 5 | #ifndef FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H_ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | USERS_MATANL_DEVELOPER_ENGINE_SRC_OUT_HOST_DEBUG_UNOPT_ARM64_______FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H 6 | #define FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | USERS_MATANL_DEVELOPER_ENGINE_SRC_OUT_HOST_DEBUG_UNOPT_ARM64_______FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H ^C ``` </details> This will likely show failures on CI, so I'm following [our published directions](https://github.com/flutter/flutter/wiki/Engine-Clang-Tidy-Linter#clang-tidy-fix-on-ci) to get CI to tell me what needs to get fixed, and won't submit until there are no warnings at HEAD. As such, not seeking LGTM yet (draft). --------- Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
Closes flutter/flutter#134969.
Turns out this was literally 1 line. Tested locally:
dart tools/clang_tidy/bin/main.dart \ --target-variant host_debug_unopt_arm64 \ --lint-all \ --checks="-*,llvm-header-guard"
Local Test Results
Here is a tiny snippet showing this is indeed doing something:
This will likely show failures on CI, so I'm following our published directions to get CI to tell me what needs to get fixed, and won't submit until there are no warnings at HEAD. As such, not seeking LGTM yet (draft).