-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use gazelle to generate go bazel build files.
- Loading branch information
1 parent
34b2cfc
commit 2e0f567
Showing
10 changed files
with
126 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | ||
load("@bazel_gazelle//:def.bzl", "gazelle") | ||
|
||
# gazelle:prefix alipay.com/code_insight/coref-go-extractor | ||
gazelle(name = "gazelle") | ||
|
||
go_library( | ||
name = "coref-go-extractor_lib", | ||
srcs = ["main.go"], | ||
importpath = "alipay.com/code_insight/coref-go-extractor", | ||
visibility = ["//visibility:private"], | ||
deps = [ | ||
"//language/go/extractor/src/config", | ||
"//language/go/extractor/src/core", | ||
], | ||
) | ||
|
||
go_binary( | ||
name = "extractor", | ||
embed = [":coref-go-extractor_lib"], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | ||
|
||
go_library( | ||
name = "cli_lib", | ||
srcs = [ | ||
"extractor_cli.go", | ||
"helper.go", | ||
], | ||
importpath = "alipay.com/code_insight/coref-go-extractor/src/cli", | ||
visibility = ["//visibility:private"], | ||
deps = [ | ||
"//language/go/extractor/src/config", | ||
"//language/go/extractor/src/core", | ||
"//language/go/extractor/src/util", | ||
"@org_golang_x_mod//semver", | ||
], | ||
) | ||
|
||
go_binary( | ||
name = "cli", | ||
embed = [":cli_lib"], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "config", | ||
srcs = ["config.go"], | ||
importpath = "alipay.com/code_insight/coref-go-extractor/src/config", | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "core", | ||
srcs = [ | ||
"extract_file.go", | ||
"extract_mod.go", | ||
"extract_pkg.go", | ||
"extraction.go", | ||
"label.go", | ||
"profile.go", | ||
], | ||
importpath = "alipay.com/code_insight/coref-go-extractor/src/core", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//language/go/extractor/src/config", | ||
"//language/go/extractor/src/orm", | ||
"//language/go/extractor/src/util", | ||
"@io_gorm_gorm//:gorm", | ||
"@org_golang_x_mod//modfile", | ||
"@org_golang_x_tools//go/packages", | ||
"@org_modernc_mathutil//:mathutil", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "orm", | ||
srcs = [ | ||
"data_decl.go", | ||
"data_types.go", | ||
"db_model.go", | ||
"db_writer.go", | ||
], | ||
importpath = "alipay.com/code_insight/coref-go-extractor/src/orm", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@com_github_glebarez_sqlite//:sqlite", | ||
"@io_gorm_gorm//:gorm", | ||
"@io_gorm_gorm//logger", | ||
"@io_gorm_gorm//schema", | ||
"@org_golang_x_tools//go/packages", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "util", | ||
srcs = [ | ||
"setup.go", | ||
"util.go", | ||
], | ||
importpath = "alipay.com/code_insight/coref-go-extractor/src/util", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_test( | ||
name = "util_test", | ||
srcs = ["util_test.go"], | ||
embed = [":util"], | ||
deps = [ | ||
"@com_github_stretchr_testify//assert", | ||
"@com_github_stretchr_testify//require", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,4 +127,3 @@ genrule( | |
"@maven//:org_xerial_sqlite_jdbc", | ||
], | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters