mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Swift: first skeleton extractor
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.
This commit is contained in:
19
defs.bzl
Normal file
19
defs.bzl
Normal file
@@ -0,0 +1,19 @@
|
||||
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,
|
||||
)
|
||||
Reference in New Issue
Block a user