Skip to content

v0.14.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 14 Mar 19:38
· 167 commits to main since this release
1fbcfee

BREAKING CHANGES

Getting ready for 1.0 so a bunch of breaking changes have landed since v0.13.

  • Many renames: Public API symbol symbols now prefixed with lint_
  • WORKSPACE users should check the snippet below:
    • must now call rules_lint_dependencies()
    • must either install rules_multitool, or set some languages to False in call to format_multirun
  • multi_formatter_binary renamed to format_multirun
    • attribute protobuf renamed to protocol_buffer

Using Bzlmod with Bazel 6

  1. Enable with common --enable_bzlmod in .bazelrc.
  2. Add to your MODULE.bazel file:
bazel_dep(name = "aspect_rules_lint", version = "0.14.2")

# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v0.14.2/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v0.14.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 = "07dd6258894757e44db1a5dd3650731c1432cad7795afdaa6d945d4ba3b84f68",
    strip_prefix = "rules_lint-0.14.2",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.14.2/rules_lint-v0.14.2.tar.gz",
)

# aspect_rules_lint depends on aspect_bazel_lib. Either 1.x or 2.x works.
http_archive(
    name = "aspect_bazel_lib",
    sha256 = "979667bb7276ee8fcf2c114c9be9932b9a3052a64a647e0dcaacfb9c0016f0a3",
    strip_prefix = "bazel-lib-2.4.1",
    url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.4.1/bazel-lib-v2.4.1.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_pmd",
    "fetch_swiftformat",
    "fetch_terraform",
    "rules_lint_dependencies",
)

rules_lint_dependencies()

fetch_pmd()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_swiftformat()

load("@aspect_rules_lint//lint:ruff.bzl", "fetch_ruff")

fetch_ruff()

load("@aspect_rules_lint//lint:golangci-lint.bzl", "fetch_golangci_lint")

fetch_golangci_lint()

load("@aspect_rules_lint//lint:shellcheck.bzl", "fetch_shellcheck")

fetch_shellcheck()

load("@aspect_rules_lint//lint:vale.bzl", "fetch_vale")

fetch_vale()

########################
# Optional: multitool provides defaults for some tools such as yamlfmt
# If you do not set up multitool, you will be forced to either set an explicit tool
# for languages that have a default, or set explicit False value, e.g.
#   format_multirun(jsonnet = False)
load("@rules_multitool//multitool:multitool.bzl", "multitool")

multitool(
    name = "multitool",
    lockfile = "@aspect_rules_lint//format:multitool.lock.json",
)

What's Changed

Full Changelog: v0.14.1...v0.14.2