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.
chore: delete the Aspect CLI plugin (#26)
* chore: delete the Aspect CLI plugin With that code removed, we're okay with licensing this as Apache 2.0 * Update linting.md * Update BUILD.bazel
- Loading branch information
Showing
12 changed files
with
15 additions
and
1,011 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,60 +1,11 @@ | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
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") | ||
load("@gazelle//:def.bzl", "gazelle", "gazelle_binary") | ||
|
||
gazelle_binary( | ||
name = "gazelle_bin", | ||
languages = DEFAULT_LANGUAGES + [ | ||
"@bazel_skylib_gazelle_plugin//bzl", | ||
], | ||
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/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_fatih_color//:color", | ||
"@com_github_hashicorp_go_plugin//:go-plugin", | ||
"@in_gopkg_yaml_v2//:yaml_v2", | ||
], | ||
) | ||
|
||
# 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"], | ||
) | ||
|
||
# TODO: add a Go unit test of the plugin logic. | ||
# For now we just test that it builds. | ||
build_test( | ||
name = "test", | ||
targets = [":lint-plugin"], | ||
) | ||
|
||
# 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
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,6 @@ | ||
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 | ||
properties: | ||
lint_aspects: | ||
- //tools:lint.bzl%eslint | ||
- //tools:lint.bzl%buf | ||
- //tools:lint.bzl%flake8 | ||
- //tools:lint.bzl%pmd | ||
lint: | ||
aspects: | ||
- //tools:lint.bzl%eslint | ||
- //tools:lint.bzl%buf | ||
- //tools:lint.bzl%flake8 | ||
- //tools:lint.bzl%pmd |
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
Oops, something went wrong.