generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alex Eagle <[email protected]>
- Loading branch information
Showing
11 changed files
with
964 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary") | ||
load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary") | ||
load("@rules_go//go:def.bzl", "go_binary", "go_library") | ||
load("//release:release.bzl", "local_plugin") | ||
|
||
gazelle_binary( | ||
name = "gazelle_bin", | ||
languages = ["@bazel_skylib_gazelle_plugin//bzl"], | ||
languages = DEFAULT_LANGUAGES + [ | ||
"@bazel_skylib_gazelle_plugin//bzl", | ||
], | ||
) | ||
|
||
gazelle( | ||
name = "gazelle", | ||
gazelle = "gazelle_bin", | ||
) | ||
|
||
# gazelle:prefix github.com/aspect-build/rules_lint | ||
# Buildozer ships with BUILD files but doesn't follow our naming convention | ||
# gazelle:resolve go github.com/bazelbuild/buildtools/edit @com_github_bazelbuild_buildtools//edit:go_default_library | ||
go_library( | ||
name = "lint-plugin_lib", | ||
srcs = ["plugin.go"], | ||
importpath = "github.com/aspect-build/rules_lint", | ||
visibility = ["//:__subpackages__"], | ||
deps = [ | ||
"@build_aspect_cli//bazel/buildeventstream", | ||
"@build_aspect_cli//bazel/command_line", | ||
"@build_aspect_cli//pkg/aspecterrors", | ||
"@build_aspect_cli//pkg/bazel", | ||
"@build_aspect_cli//pkg/ioutils", | ||
"@build_aspect_cli//pkg/plugin/sdk/v1alpha4/config", | ||
"@build_aspect_cli//pkg/plugin/sdk/v1alpha4/plugin", | ||
"@com_github_hashicorp_go_plugin//:go-plugin", | ||
"@com_github_manifoldco_promptui//:promptui", | ||
], | ||
) | ||
|
||
# Only used for local development. | ||
# Release binaries are created by the target in /release | ||
go_binary( | ||
name = "lint-plugin", | ||
embed = [":lint-plugin_lib"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
# Build this target to copy the plugin to bazel-bin/plugin and checksum it. | ||
# Referenced by the .aspect/cli/config.yaml in the `From:` line. | ||
local_plugin( | ||
name = "dev", | ||
binary = ":lint-plugin", | ||
path = "plugin", | ||
) |
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,5 @@ | ||
plugins: | ||
- name: lint-plugin | ||
# For this to work, you must first `bazel build dev` in the root of the repo | ||
from: ../../bazel-bin/plugin | ||
log_level: warn |
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,2 @@ | ||
BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download | ||
USE_BAZEL_VERSION=aspect/5.7.2 |
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,47 @@ | ||
module github.com/aspect-build/rules_lint-aspect-cli-plugin | ||
|
||
go 1.19 | ||
|
||
require ( | ||
aspect.build/cli v1.507.2 | ||
github.com/hashicorp/go-plugin v1.4.10 | ||
github.com/manifoldco/promptui v0.9.0 | ||
) | ||
|
||
require ( | ||
github.com/bazelbuild/bazelisk v1.17.0 // indirect | ||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect | ||
github.com/chzyer/readline v1.5.1 // indirect | ||
github.com/fatih/color v1.15.0 // indirect | ||
github.com/fsnotify/fsnotify v1.6.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/hashicorp/go-hclog v1.5.0 // indirect | ||
github.com/hashicorp/go-version v1.6.0 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/hashicorp/yamux v0.1.1 // indirect | ||
github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
github.com/magiconair/properties v1.8.7 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.19 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/oklog/run v1.1.0 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect | ||
github.com/spf13/afero v1.9.5 // indirect | ||
github.com/spf13/cast v1.5.1 // indirect | ||
github.com/spf13/cobra v1.7.0 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/spf13/viper v1.16.0 // indirect | ||
github.com/subosito/gotenv v1.4.2 // indirect | ||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect | ||
golang.org/x/net v0.10.0 // indirect | ||
golang.org/x/sys v0.8.0 // indirect | ||
golang.org/x/text v0.9.0 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect | ||
google.golang.org/grpc v1.55.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/ini.v1 v1.67.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.