Skip to content

v0.20.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 14:21
· 125 commits to main since this release
ee3f7df

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.20.0")

# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v0.20.0/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v0.20.0/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 = "572be80134ce36b0ad17229a37945efdfa1381468ae804008a1a16dc35686a05",
    strip_prefix = "rules_lint-0.20.0",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.20.0/rules_lint-v0.20.0.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_swiftformat",
    "rules_lint_dependencies",
)

rules_lint_dependencies()

fetch_java_format()

fetch_ktfmt()

fetch_swiftformat()

load("@aspect_rules_lint//lint:pmd.bzl", "fetch_pmd")

fetch_pmd()

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

fetch_ruff()

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 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",
    lockfiles = [
        "@aspect_rules_lint//format:multitool.lock.json",
        "@aspect_rules_lint//lint:multitool.lock.json",
    ],
)

What's Changed

  • chore(deps): update terraform to latest by @alexeagle in #202
  • feat: remove golangci-lint by @alexeagle in #207
  • Changes by create-pull-request action by @github-actions in #209
  • Changes by create-pull-request action by @github-actions in #213
  • fix: pass flag to shfmt to ignore passed files in check mode by @daewok in #211
  • Changes by create-pull-request action by @github-actions in #214
  • Update flake8 docs by @codrin-lanterne in #206
  • feat(format): Add ability to ignore files by @mrmeku in #210
  • feat(lint): Add Kotlin linter using ktlint by @smocherla-brex in #215
  • chore: add sh_test for ls-files function by @alexeagle in #216
  • ktlint: Add option to use custom rulesets by @smocherla-brex in #220
  • Changes by create-pull-request action by @github-actions in #218
  • fix: use allow_files in lint_ruff_aspect by @lpulley in #217
  • Changes by create-pull-request action by @github-actions in #223
  • chore: don't cancel concurrent main builds by @gregmagolan in #226
  • feat(lint): plumb exit codes as outputs rather than dropping them by @alexeagle in #225
  • Changes by create-pull-request action by @github-actions in #232
  • fix: lint.sh pass norun_validations by @alexeagle in #231
  • refactor: produce report and exit code in the same action with fixes by @alexeagle in #227
  • chore: compatibility with rules_js 2 by @alexeagle in #221

New Contributors

Full Changelog: v0.18.0...v0.20.0