Skip to content

Releases: aspect-build/rules_lint

v0.14.0

12 Mar 19:34
452edf8
Compare
Choose a tag to compare
v0.14.0 Pre-release
Pre-release

Broken due to #169, do not use

v0.13.0

05 Mar 15:34
c221741
Compare
Choose a tag to compare
v0.13.0 Pre-release
Pre-release

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

# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v0.13.0/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v0.13.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 = "c0824de8400f1e271c5568fc47581e165b2132f9d21691fcfefe8bf89ad413bd",
    strip_prefix = "rules_lint-0.13.0",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.13.0/rules_lint-v0.13.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()

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_gofumpt",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
    "fetch_yamlfmt",
)

fetch_gofumpt()

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

fetch_swiftformat()

fetch_yamlfmt()

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()

What's Changed

  • docs(golangci-lint): fix the target name by @srabraham in #144
  • collapse common logic into run-format formula by @pjjw in #119
  • fix: pass flag to shfmt to ignore passed files by @alexeagle in #146
  • Changes by create-pull-request action by @github-actions in #147
  • chore: cleanup maybe patterns by @gregmagolan in #139
  • feat: add yamlfmt for YAML by @alexeagle in #153
  • refactor: remove Vale workaround for StylesPath by @alexeagle in #148
  • refactor: break up tools/ into tools/format and tools/lint by @alexeagle in #159
  • Changes by create-pull-request action by @github-actions in #162

New Contributors

Full Changelog: v0.12.0...v0.13.0

v0.12.0

09 Feb 23:35
0de7861
Compare
Choose a tag to compare
v0.12.0 Pre-release
Pre-release

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

# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v0.12.0/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v0.12.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 = "41fad363f11ccab46a244f93f8ccb0f442bc235e606d2fad87801987ad0759b1",
    strip_prefix = "rules_lint-0.12.0",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.12.0/rules_lint-v0.12.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()

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_gofumpt",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_gofumpt()

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

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()

What's Changed

Full Changelog: v0.11.1...v0.12.0

v0.11.1

08 Feb 19:58
ebe8678
Compare
Choose a tag to compare
v0.11.1 Pre-release
Pre-release

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

# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v0.11.1/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v0.11.1/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 = "6005ba6868e471afbd4bffdb92236679a9755239f2b2fa87922644aa9ba5ded0",
    strip_prefix = "rules_lint-0.11.1",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.11.1/rules_lint-v0.11.1.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()

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_gofumpt",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_gofumpt()

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

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()

What's Changed

  • chore: remove Go by @alexeagle in #136
  • fix undocumented dependency on aspect_bazel_lib for WORKSPACE users by @mattnworb in #138
  • Changes by create-pull-request action by @github-actions in #135
  • format: fix exit code of check when using clang-format by @tomgr in #133
  • fix(HCL): back out from formatting all HCL files by @alexeagle in #143
  • fix(eslint): switch to compact report by @alexeagle in #140

New Contributors

Full Changelog: v0.11.0...v0.11.1

v0.11.0

30 Jan 16:52
Compare
Choose a tag to compare
v0.11.0 Pre-release
Pre-release

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_gofumpt",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_gofumpt()

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

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()

What's Changed

  • Update README.md by @alexeagle in #115
  • golangci-lint: Capture results from stdout rather than stderr by @jelmer in #116
  • ci: add test coverage for format binary by @alexeagle in #126
  • fix filename pattern matching by @pjjw in #127
  • Add gofumpt as an alternative go formatter by @jelmer in #114
  • chore: BCR testing on Bazel 6 and 7 by @alexeagle in #125
  • golangci-lint: Handle empty srcs list by @jelmer in #128
  • Changes by create-pull-request action by @github-actions in #131

New Contributors

Full Changelog: v0.10.0...v0.11.0

v0.10.0

22 Jan 17:25
e8b525e
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release

🔴 This release has a critical bug #122 : running the formatter with no arguments doesn't recurse into subfolders properly.
Please upgrade.

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

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()

What's Changed

Full Changelog: v0.9.1...v0.10.0

v0.9.1

11 Jan 23:06
260ee0f
Compare
Choose a tag to compare
v0.9.1 Pre-release
Pre-release

Note that the v0.9.0 tag was placed at the wrong commit, so that release was skipped.

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

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()

What's Changed

Full Changelog: v0.8.0...v0.9.1

v0.8.0

04 Jan 19:54
ddd884b
Compare
Choose a tag to compare
v0.8.0 Pre-release
Pre-release

🔴 BREAKING CHANGE: to format Markdown files, you must now explicitly add a markdown attribute to the multi_formatter_binary.
Note that there is a bug in this release: if you don't add markdown, then no formatting is done for javascript.

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

fetch_swiftformat()

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

fetch_ruff()

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

fetch_shellcheck()

What's Changed

  • docs: explain which production of ts_project to lint by @alexeagle in #76
  • Changes by create-pull-request action by @github-actions in #83
  • Fix ruff by @alexeagle in #84
  • chore: explain why we don't add mypy here by @alexeagle in #85
  • Changes by create-pull-request action by @github-actions in #87
  • Exclude deleted files and include untracked ones from format by @psalaberria002 in #89
  • feat: generate a patch file with linter fixes by @dzbarsky in #62
  • Add ruff aspect to py_test by @psalaberria002 in #93
  • Changes by create-pull-request action by @github-actions in #92
  • Ruff Windows Support by @LaurenceTews in #91

New Contributors

Full Changelog: v0.7.0...v0.8.0

v0.7.0

07 Dec 19:48
94acce4
Compare
Choose a tag to compare
v0.7.0 Pre-release
Pre-release

🔴 BREAKING CHANGE:

eslint_aspect config is now named configs and can accept a list as well as a string.

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

fetch_swiftformat()

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

fetch_ruff()

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

fetch_shellcheck()

What's Changed

  • fix: Respect exclude when formatting with ruff by @jsharpe in #70
  • refactor: reduce duplication in formatter lang:tool mapping by @alexeagle in #68
  • chore: change maintainer to individual rather than team. by @alexeagle in #71
  • feat: allow multiple eslint configs in one aspect definition by @alexeagle in #72
  • Give up on upstream by @alexeagle in #73
  • fix(eslint): declare copy_to_bin toolchains for bazel-lib 2.0 compat by @alexeagle in #75

New Contributors

Full Changelog: v0.6.1...v0.7.0

v0.6.1

05 Dec 16:13
6fb7745
Compare
Choose a tag to compare
v0.6.1 Pre-release
Pre-release

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

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

# Use whichever formatter binaries you need:
load(
    "@aspect_rules_lint//format:repositories.bzl",
    "fetch_java_format",
    "fetch_jsonnet",
    "fetch_ktfmt",
    "fetch_pmd",
    "fetch_shfmt",
    "fetch_swiftformat",
    "fetch_terraform",
)

fetch_pmd()

fetch_jsonnet()

fetch_terraform()

fetch_java_format()

fetch_ktfmt()

fetch_shfmt()

fetch_swiftformat()

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

fetch_ruff()

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

fetch_shellcheck()

What's Changed

  • fix: only present reports from the current bazel run by @alexeagle in #61
  • fix: in use_exit_code mode, print reports to stdio by @alexeagle in #63
  • ci: add integration testing by @alexeagle in #64
  • chore: wire up protobuf formatter by @alexeagle in #67
  • fix: workaround Bazel extract bug by @alexeagle in #66
  • Changes by create-pull-request action by @github-actions in #69
  • fix: don't eslint on js_binary, it has no srcs by @alexeagle in #65

Full Changelog: v0.6.0...v0.6.1