Skip to content

Commit a323cce

Browse files
authored
Merge pull request #8630 from redsun82/bazel-workspace
Bazel: add skeleton bazel workspace
2 parents 002f7cd + 1cc7621 commit a323cce

File tree

7 files changed

+59
-2
lines changed

7 files changed

+59
-2
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Byte-compiled python files
1818
*.pyc
1919

20-
# python virtual environment folder
20+
# python virtual environment folder
2121
.venv/
2222

2323
# It's useful (though not required) to be able to unpack codeql in the ql checkout itself
@@ -29,4 +29,7 @@ csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json
2929
.codeql
3030

3131
# Compiled class file
32-
*.class
32+
*.class
33+
34+
# links create by bazel
35+
/bazel-*

CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@
3131

3232
# QL for QL reviewers
3333
/ql/ @github/codeql-ql-for-ql-reviewers
34+
35+
# Bazel
36+
**/*.bazel @github/codeql-ci-reviewers
37+
**/*.bzl @github/codeql-ci-reviewers

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ After the experimental query is merged, we welcome pull requests to improve it.
7070
If you contribute to this project, we will record your name and email address (as provided by you with your contributions) as part of the code repositories, which are public. We might also use this information to contact you in relation to your contributions, as well as in the normal course of software development. We also store records of CLA agreements signed in the past, but no longer require contributors to sign a CLA. Under GDPR legislation, we do this on the basis of our legitimate interest in creating the CodeQL product.
7171

7272
Please do get in touch ([email protected]) if you have any questions about this or our data protection policies.
73+
74+
## Bazel
75+
Please notice that any bazel targets and definitions in this repository are currently experimental
76+
and for internal use only.

WORKSPACE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Please notice that any bazel targets and definitions in this repository are currently experimental
2+
# and for internal use only.

cpp/BUILD.bazel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("@rules_pkg//:mappings.bzl", "pkg_filegroup")
4+
5+
alias(
6+
name = "dbscheme",
7+
actual = "//cpp/ql/lib:dbscheme",
8+
)
9+
10+
pkg_filegroup(
11+
name = "db-files",
12+
srcs = [
13+
":dbscheme",
14+
"//cpp/downgrades",
15+
"//cpp/ql/lib:dbscheme-stats",
16+
],
17+
)

cpp/downgrades/BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
2+
3+
pkg_files(
4+
name = "downgrades",
5+
srcs = glob(
6+
["**"],
7+
exclude = ["BUILD.bazel"],
8+
),
9+
prefix = "cpp/downgrades",
10+
strip_prefix = strip_prefix.from_pkg(),
11+
visibility = ["//cpp:__pkg__"],
12+
)

cpp/ql/lib/BUILD.bazel

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package(default_visibility = ["//cpp:__pkg__"])
2+
3+
load("@rules_pkg//:mappings.bzl", "pkg_files")
4+
5+
pkg_files(
6+
name = "dbscheme",
7+
srcs = ["semmlecode.cpp.dbscheme"],
8+
prefix = "cpp",
9+
)
10+
11+
pkg_files(
12+
name = "dbscheme-stats",
13+
srcs = ["semmlecode.cpp.dbscheme.stats"],
14+
prefix = "cpp",
15+
)

0 commit comments

Comments
 (0)