This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Enable checking headers with Clang Tidy.#46009
Merged
matanlurey merged 16 commits intoflutter:mainfrom Sep 22, 2023
Merged
Conversation
5a96a00 to
f3376d2
Compare
Contributor
Author
|
I need to revert the CI script but I wanted to show the CI logs as-is as part of the review! |
Member
|
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? |
zanderso
reviewed
Sep 22, 2023
Contributor
Author
Yup. It took about 20 PRs but we are (currently) green as far as we can tell. |
Member
Whoa. That's awesome! |
Co-authored-by: Zachary Anderson <[email protected]>
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 22, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Sep 22, 2023
flutter/engine@ef9ceed...92be04f 2023-09-22 [email protected] Roll Skia from 8beae2053939 to fe73688dc40f (1 revision) (flutter/engine#46202) 2023-09-22 [email protected] Enable checking headers with Clang Tidy. (flutter/engine#46009) 2023-09-22 [email protected] 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 [email protected],[email protected],[email protected] 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
Mairramer
pushed a commit
to Mairramer/flutter
that referenced
this pull request
Oct 10, 2023
…5319) flutter/engine@ef9ceed...92be04f 2023-09-22 [email protected] Roll Skia from 8beae2053939 to fe73688dc40f (1 revision) (flutter/engine#46202) 2023-09-22 [email protected] Enable checking headers with Clang Tidy. (flutter/engine#46009) 2023-09-22 [email protected] 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 [email protected],[email protected],[email protected] 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
harryterkelsen
pushed a commit
that referenced
this pull request
Oct 23, 2023
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 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
[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 ^CThis 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).