mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
This adds a first dummy extractor for swift. Running `bazel run //swift:install` will create an `extractor_pack` directory in `swift`. From that moment providing `--search-path=swift` will pick up the extractor.
20 lines
516 B
Python
20 lines
516 B
Python
codeql_platform = select({
|
|
"@platforms//os:linux": "linux64",
|
|
"@platforms//os:macos": "osx64",
|
|
"@platforms//os:windows": "win64",
|
|
})
|
|
|
|
_paths_bzl = """
|
|
def source_dir():
|
|
return '%s/' + native.package_name()
|
|
"""
|
|
|
|
def _ql_utils_impl(repository_ctx):
|
|
root = repository_ctx.path(Label("@ql//:WORKSPACE.bazel")).realpath.dirname
|
|
repository_ctx.file("BUILD.bazel")
|
|
repository_ctx.file("paths.bzl", content = _paths_bzl % root)
|
|
|
|
ql_utils = repository_rule(
|
|
implementation = _ql_utils_impl,
|
|
)
|