don't run clang tidy on external unless requested

Bug: 268668248
Test: compare number of tidy actions before and after change:
  WITH_TIDY=1 bb aquery --config=android 'mnemonic(ClangTidy, deps(//packages/modules/NeuralNetworks/apex:com.android.neuralnetworks))' --output=summary
Test: verify that Bazel tidy actions don't have a large diff from Soong tidy actions:
  (add -v to Ninja invocation in ui/build/ninja.go [and disable fifo file])
  WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd 2>&1 | tee soong_build-tidy.adbd &&
  WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd --bazel-mode-staging 2>&1 | tee mixed_build-tidy.adbd &&
  grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" soong_build-tidy.adbd | sort -u > soong-clang-tidy.adbd &&
  grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" mixed_build-tidy.adbd | sort -u > mixed-clang-tidy.adbd &&
  vimdiff soong_build-tidy.adbd mixed_build-tidy.adbd
Change-Id: I5193cd58b1b40bcdf9b955e45d20eb722d8292a8
3 files changed
tree: 7af461860ad9f3b2cb56ca503f1ef21a10de3920
  1. bin/
  2. ci/
  3. compliance/
  4. docs/
  5. examples/
  6. flags/
  7. json_module_graph/
  8. mk2rbc/
  9. mkcompare/
  10. platforms/
  11. product_config/
  12. product_variables/
  13. rules/
  14. scripts/
  15. tests/
  16. vendor/
  17. .gitignore
  18. bazel.BUILD
  19. bazel.WORKSPACE
  20. buildifier_hook.sh
  21. common.bazelrc
  22. darwin.bazelrc
  23. linux.bazelrc
  24. OWNERS
  25. PREUPLOAD.cfg
  26. README.md
README.md

Bazel

The code in this directory is experimental. Bazel support for Android Platform is undergoing active development and workflow stability is currently not guaranteed.