2024-08-02 22:30:12 +02:00
|
|
|
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
|
2024-11-15 17:04:32 +01:00
|
|
|
load("@npm//:defs.bzl", "npm_link_all_packages")
|
2024-02-05 19:11:10 +01:00
|
|
|
|
2023-11-28 23:20:17 +01:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2024-01-30 09:31:05 +01:00
|
|
|
exports_files([
|
|
|
|
"pyproject.toml",
|
|
|
|
"poetry.lock",
|
2024-08-21 23:25:30 +02:00
|
|
|
"symbols.orderfile",
|
2024-01-30 09:31:05 +01:00
|
|
|
])
|
2024-02-05 19:11:10 +01:00
|
|
|
|
|
|
|
npm_link_all_packages(name = "node_modules")
|
|
|
|
|
2024-02-28 17:45:08 +01:00
|
|
|
alias(
|
2024-02-05 19:11:10 +01:00
|
|
|
name = "format",
|
2024-02-28 17:45:08 +01:00
|
|
|
actual = "//bazel/format",
|
2024-02-05 19:11:10 +01:00
|
|
|
)
|
2024-04-04 20:13:22 +02:00
|
|
|
|
|
|
|
alias(
|
|
|
|
name = "codeowners",
|
|
|
|
actual = "//buildscripts:codeowners",
|
|
|
|
)
|
2024-04-19 01:00:12 +02:00
|
|
|
|
2024-04-19 23:27:12 +02:00
|
|
|
# This rule makes it possible to set the clang-tidy configuration setting:
|
|
|
|
genrule(
|
2024-04-19 01:00:12 +02:00
|
|
|
name = "clang_tidy_config",
|
2024-04-19 23:27:12 +02:00
|
|
|
srcs = [
|
|
|
|
".clang-tidy.in",
|
|
|
|
],
|
|
|
|
outs = [".clang-tidy"],
|
|
|
|
|
|
|
|
# Note: we use sed to substitute the known good value `build/compiledb/mongo`; testing
|
|
|
|
# has confirmed that this is the correct value.
|
2024-11-15 17:04:32 +01:00
|
|
|
# We also use it to append a line to opt-in to warnings as errors.
|
2024-04-19 23:27:12 +02:00
|
|
|
cmd = """
|
|
|
|
cp $(location .clang-tidy.in) $@ && \
|
2024-11-15 17:04:32 +01:00
|
|
|
sed -i 's|@MONGO_BUILD_DIR@|$(RULEDIR)/src/mongo|g ; $$aWarningsAsErrors: "*"' $@
|
2024-04-19 23:27:12 +02:00
|
|
|
""",
|
2024-04-19 01:00:12 +02:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
2024-08-02 22:30:12 +02:00
|
|
|
|
|
|
|
refresh_compile_commands(
|
|
|
|
name = "compiledb",
|
|
|
|
exclude_external_sources = True,
|
|
|
|
exclude_headers = "all", # not using "all" adds headers as sources to compile_commands.json which is never what we want
|
2024-11-19 20:30:04 +01:00
|
|
|
tags = ["compiledb"],
|
2024-08-02 22:30:12 +02:00
|
|
|
targets = {
|
|
|
|
"//src/...": "",
|
|
|
|
},
|
|
|
|
)
|