v1.0.2
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "aspect_rules_lint", version = "1.0.2")
# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v1.0.2/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v1.0.2/docs/formatting.md
Using WORKSPACE
Paste this snippet into your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_lint",
sha256 = "7d5feef9ad85f0ba78cc5757a9478f8fa99c58a8cabc1660d610b291dc242e9b",
strip_prefix = "rules_lint-1.0.2",
url = "https://github.com/aspect-build/rules_lint/releases/download/v1.0.2/rules_lint-v1.0.2.tar.gz",
)
# aspect_rules_lint depends on aspect_bazel_lib.
http_archive(
name = "aspect_bazel_lib",
sha256 = "6d758a8f646ecee7a3e294fbe4386daafbe0e5966723009c290d493f227c390b",
strip_prefix = "bazel-lib-2.7.7",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.7/bazel-lib-v2.7.7.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
# aspect_bazel_lib depends on bazel_skylib
aspect_bazel_lib_dependencies()
load(
"@aspect_rules_lint//format:repositories.bzl",
# Fetch additional formatter binaries you need:
"fetch_java_format",
"fetch_ktfmt",
"fetch_swiftformat",
"rules_lint_dependencies",
)
rules_lint_dependencies()
fetch_java_format()
fetch_ktfmt()
fetch_swiftformat()
load("@aspect_rules_lint//lint:checkstyle.bzl", "fetch_checkstyle")
fetch_checkstyle()
load("@aspect_rules_lint//lint:pmd.bzl", "fetch_pmd")
fetch_pmd()
load("@aspect_rules_lint//lint:vale.bzl", "fetch_vale")
fetch_vale()
load("@aspect_rules_lint//lint:ktlint.bzl", "fetch_ktlint")
fetch_ktlint()
########################
# Optional: multitool provides defaults for some tools such as yamlfmt
# If you do not set up multitool, you must provide these tools yourself
load("@rules_multitool//multitool:multitool.bzl", "multitool")
multitool(
name = "multitool",
lockfiles = [
"@aspect_rules_lint//format:multitool.lock.json",
"@aspect_rules_lint//lint:multitool.lock.json",
],
)
What's Changed
- Fix broken link in linting.md by @mark-thm in #388
- Use --diff when running ruff as check by @TimotheusBachinger in #386
- Changes by create-pull-request action by @github-actions in #390
- fix: support file list input for format command to bypass OS limits by @mrmeku in #391
- chore: point to non-deprecated rustfmt by @alexeagle in #392
- fix: Include stylelint config deps (#394) by @sallustfire in #395
- chore: discourage use of select by @alexeagle in #393
- Changes by create-pull-request action by @github-actions in #396
- Changes by create-pull-request action by @github-actions in #397
- fix: shellcheck should visit srcs of sh_test by @alexeagle in #398
- Changes by create-pull-request action by @github-actions in #399
- chore: bump to latest release of Aspect CLI by @gregmagolan in #403
New Contributors
- @mark-thm made their first contribution in #388
- @TimotheusBachinger made their first contribution in #386
Full Changelog: v1.0.1...v1.0.2