Commit graph

6 commits

Author SHA1 Message Date
Chih-hung Hsieh
6f9312127c Merge "Disable tidy checks in TidyGlobalNoChecks" 2022-06-10 18:01:08 +00:00
Yasin Kilicdere
5a8ce13c2a Revert "Disallow -warnings-as-errors in tidy_flags"
This reverts commit 2d481842b1.

Reason for revert: b/235569235#comment4

Change-Id: I5c87b1d5a1bdf0bad7f436c397688fe3fc20d04e
2022-06-10 12:18:07 +00:00
Chih-Hung Hsieh
43b920e707 Disable tidy checks in TidyGlobalNoChecks
* Save repeated strings in TidyFlags of build.ninja rules.
* Some of these checks were disabled to upgrade clang-tidy.
  They could later be moved to TidyDefaultGlobalChecks and
  TidyExternalVendorChecks if not breaking the build.
  Some projects can then enable those checks locally.

Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I70e4218c929e3c88f766f2c68c56c51356110e72
2022-06-09 17:58:41 -07:00
Chih-Hung Hsieh
2d481842b1 Disallow -warnings-as-errors in tidy_flags
* Also remove the undocumented complicated
  experiment to overwrite local warnings-as-errors.

Bug: 229801437
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I2fb32146b4685ab9f5198724c15c303f799b7a14
2022-06-09 11:12:10 -07:00
Chih-Hung Hsieh
80e3e03aa9 Shorten the -checks flag in clang-tidy rules
* If a module defines tidy_checks with "-*",
  pass only "-*" and checks after it to clang-tidy.

Test: make tidy-soong_subset
Change-Id: I2a4a6111f67b934bc29e4e4fe8596a8dce4e7031
2022-06-03 17:17:17 -07:00
Chih-Hung Hsieh
104f51f70b add ALLOW_LOCAL_TIDY_TRUE and some tests
* A new ALLOW_LOCAL_TIDY_TRUE variable, default is false.
* If it is 0/false, local "tidy:true" is ignored.
* If it is 1/true, local "tidy:true" is honored as it is now.

Bug: 229779921
Test: make with and without ALLOW_LOCAL_TIDY_TRUE=1
Change-Id: I0323289a4d3bb2514982252a5a1339e94f2bbaab
2022-04-26 13:30:32 -07:00