Skip to content

Commit

Permalink
Release 0.51.0 (bazelbuild#2881)
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Oct 3, 2024
1 parent 59464fe commit f08f7a3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module(
name = "rules_rust",
version = "0.50.1",
version = "0.51.0",
)

bazel_dep(
Expand Down
9 changes: 5 additions & 4 deletions rust/private/clippy.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def _get_clippy_ready_crate_info(target, aspect_ctx = None):
# Targets with specific tags will not be formatted
if aspect_ctx:
ignore_tags = [
"no_clippy",
"no_lint",
"noclippy",
"no-clippy",
]

for tag in ignore_tags:
if tag in aspect_ctx.rule.attr.tags:
for tag in aspect_ctx.rule.attr.tags:
if tag.replace("-", "_").lower() in ignore_tags:
return None

# Obviously ignore any targets that don't contain `CrateInfo`
Expand Down Expand Up @@ -192,6 +192,7 @@ def _clippy_aspect_impl(target, ctx):
tools = [toolchain.clippy_driver],
arguments = args.all,
mnemonic = "Clippy",
progress_message = "Clippy %{label}",
toolchain = "@rules_rust//rust:toolchain_type",
)

Expand Down
9 changes: 5 additions & 4 deletions rust/private/rustfmt.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def _find_rustfmtable_srcs(crate_info, aspect_ctx = None):
# Targets with specific tags will not be formatted
if aspect_ctx:
ignore_tags = [
"no-format",
"no-rustfmt",
"no_format",
"no_rustfmt",
"norustfmt",
]

for tag in ignore_tags:
if tag in aspect_ctx.rule.attr.tags:
for tag in aspect_ctx.rule.attr.tags:
if tag.replace("-", "_").lower() in ignore_tags:
return []

# Filter out any generated files
Expand Down Expand Up @@ -92,6 +92,7 @@ def _perform_check(edition, srcs, ctx):
tools = [rustfmt_toolchain.all_files],
arguments = [args],
mnemonic = "Rustfmt",
progress_message = "Rustfmt %{label}",
)

return marker
Expand Down
2 changes: 1 addition & 1 deletion version.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""The version of rules_rust."""

VERSION = "0.50.1"
VERSION = "0.51.0"

0 comments on commit f08f7a3

Please sign in to comment.