This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
BUILD.bazel
92 lines (81 loc) · 2.35 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Disable build files generation for these directories
# gazelle:exclude vendor/github.com/bazelbuild/buildtools/buildifier2
# gazelle:exclude vendor/golang.org/x/tools/cmd/fiximports/testdata
# gazelle:exclude vendor/golang.org/x/tools/go/gcimporter15/testdata
# gazelle:exclude vendor/golang.org/x/tools/go/internal/gccgoimporter/testdata
# gazelle:exclude vendor/golang.org/x/tools/go/loader/testdata
# gazelle:exclude vendor/golang.org/x/tools/go/internal/gcimporter/testdata
# gazelle:proto disable_global
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@com_github_atlassian_bazel_tools//buildozer:def.bzl", "buildozer")
load("@com_github_atlassian_bazel_tools//goimports:def.bzl", "goimports")
load("@com_github_atlassian_bazel_tools//golangcilint:def.bzl", "golangcilint")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "nogo")
gazelle(
name = "gazelle",
external = "vendored",
gazelle = "@bazel_gazelle//cmd/gazelle:gazelle_pure",
prefix = "github.com/atlassian/smith",
)
gazelle(
name = "gazelle_fix",
command = "fix",
external = "vendored",
gazelle = "@bazel_gazelle//cmd/gazelle:gazelle_pure",
prefix = "github.com/atlassian/smith",
)
go_library(
name = "go_default_library",
srcs = ["api.go"],
importpath = "github.com/atlassian/smith",
visibility = ["//visibility:public"],
)
buildifier(
name = "buildifier",
exclude_patterns = ["./vendor/*"],
)
buildifier(
name = "buildifier_check",
exclude_patterns = ["./vendor/*"],
mode = "check",
)
buildifier(
name = "buildifier_fix",
lint_mode = "fix",
)
buildozer(
name = "buildozer",
commands = "build/buildozer_commands.txt",
)
goimports(
name = "goimports",
display_diffs = True,
exclude_files = [
"zz_generated.*",
],
exclude_paths = [
"./vendor/*",
"./pkg/client/clientset_generated/*",
],
prefix = "github.com/atlassian/smith",
write = True,
)
golangcilint(
name = "golangcilint",
config = "build/golangcilint.yaml",
paths = [
".",
"cmd/...",
"examples/...",
"it/...",
"pkg/...",
],
prefix = "github.com/atlassian/smith",
)
nogo(
name = "nogo",
config = "build/nogo-config.json",
vet = True,
visibility = ["//visibility:public"],
)