BUILD 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("@mypy_integration//:mypy.bzl", "mypy_test")
  5. py_library(
  6. name = "scripts_utils",
  7. srcs = ["scripts_utils.py"],
  8. )
  9. # Note that this Python script is intended to be run directly, and not through
  10. # Bazel. We have a rule for it so we can type check it.
  11. py_binary(
  12. name = "create_compdb",
  13. testonly = 1,
  14. srcs = ["create_compdb.py"],
  15. deps = [":scripts_utils"],
  16. )
  17. mypy_test(
  18. name = "create_compdb_mypy_test",
  19. include_imports = True,
  20. deps = [":create_compdb"],
  21. )
  22. # Note that this Python script is intended to be run directly, and not through
  23. # Bazel. We have a rule for it so we can type check it.
  24. py_binary(
  25. name = "fix_cc_deps",
  26. testonly = 1,
  27. srcs = ["fix_cc_deps.py"],
  28. deps = [":scripts_utils"],
  29. )
  30. mypy_test(
  31. name = "fix_cc_deps_mypy_test",
  32. include_imports = True,
  33. deps = [":fix_cc_deps"],
  34. )
  35. # Note that this Python script is intended to be run directly, and not through
  36. # Bazel. We have a rule for it so we can type check it.
  37. py_binary(
  38. name = "forbid_llvm_googletest",
  39. testonly = 1,
  40. srcs = ["forbid_llvm_googletest.py"],
  41. deps = [":scripts_utils"],
  42. )
  43. mypy_test(
  44. name = "forbid_llvm_googletest_mypy_test",
  45. include_imports = True,
  46. deps = [":forbid_llvm_googletest"],
  47. )
  48. # Note that this Python script is intended to be run directly, and not through
  49. # Bazel. We have a rule for it so we can type check it.
  50. py_binary(
  51. name = "run_buildifier",
  52. testonly = 1,
  53. srcs = ["run_buildifier.py"],
  54. deps = [":scripts_utils"],
  55. )
  56. mypy_test(
  57. name = "run_buildifier_mypy_test",
  58. include_imports = True,
  59. deps = [":run_buildifier"],
  60. )