Files
flutter/engine
Matan Lurey 20b6399a38 Enable checking headers with Clang Tidy. (flutter/engine#46009)
Closes https://github.com/flutter/flutter/issues/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>
2023-09-22 09:30:15 -07:00
..