Skip to content

Commit

Permalink
Go: add gazelle-generated BUILD files
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed Apr 25, 2024
1 parent 84ea3a9 commit 393f6b7
Show file tree
Hide file tree
Showing 41 changed files with 595 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ repos:

- repo: local
hooks:
- id: gazelle
name: Check gazelle-generated BUILD files
files: go/extractor/.*
language: system
entry: bazel run //go/gazelle
pass_filenames: false

- id: codeql-format
name: Fix QL file formatting
files: \.qll?$
Expand Down
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local_path_override(
# see https://registry.bazel.build/ for a list of available packages

bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_go", version = "0.47.0")
bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "rules_nodejs", version = "6.0.3")
bazel_dep(name = "rules_python", version = "0.31.0")
Expand All @@ -22,6 +23,8 @@ bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
bazel_dep(name = "fmt", version = "10.0.0")

bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "codegen_deps",
Expand Down Expand Up @@ -50,6 +53,10 @@ node.toolchain(
)
use_repo(node, "nodejs", "nodejs_toolchains")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.2")
go_sdk.host()

register_toolchains(
"@nodejs_toolchains//:all",
)
1 change: 1 addition & 0 deletions go/extractor/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*/**/BUILD.bazel linguist-generated=true
23 changes: 23 additions & 0 deletions go/extractor/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
load("@rules_go//go:def.bzl", "go_library")

# gazelle:prefix github.com/github/codeql-go/extractor

go_library(
name = "extractor",
srcs = [
"extractor.go",
"gomodextractor.go",
"semaphore.go",
],
importpath = "github.com/github/codeql-go/extractor",
visibility = ["//visibility:public"],
deps = [
"//go/extractor/dbscheme",
"//go/extractor/diagnostics",
"//go/extractor/srcarchive",
"//go/extractor/trap",
"//go/extractor/util",
"//go/extractor/vendor/golang.org/x/mod/modfile",
"//go/extractor/vendor/golang.org/x/tools/go/packages",
],
)
24 changes: 24 additions & 0 deletions go/extractor/autobuilder/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions go/extractor/cli/go-autobuilder/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions go/extractor/cli/go-bootstrap/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions go/extractor/cli/go-build-runner/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions go/extractor/cli/go-extractor/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions go/extractor/cli/go-gen-dbscheme/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions go/extractor/cli/go-tokenizer/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions go/extractor/dbscheme/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions go/extractor/diagnostics/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions go/extractor/project/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions go/extractor/srcarchive/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions go/extractor/toolchain/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions go/extractor/trap/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions go/extractor/util/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions go/extractor/vendor/golang.org/x/mod/modfile/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions go/extractor/vendor/golang.org/x/mod/module/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions go/extractor/vendor/golang.org/x/mod/semver/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions go/extractor/vendor/golang.org/x/tools/go/gcexportdata/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 393f6b7

Please sign in to comment.