Lines Matching full:rustfmt
1 """A module defining rustfmt rules"""
6 """Check that a target is suitable for rustfmt and extract the `CrateInfo` provider from it.
28 """Parse a `CrateInfo` provider for rustfmt formattable sources.
42 "no-rustfmt",
59 # Write the rustfmt manifest
60 manifest = ctx.actions.declare_file(ctx.label.name + ".rustfmt")
71 rustfmt_toolchain = ctx.toolchains[Label("//rust/rustfmt:toolchain_type")]
74 marker = ctx.actions.declare_file(ctx.label.name + ".rustfmt.ok")
79 args.add(rustfmt_toolchain.rustfmt)
91 mnemonic = "Rustfmt",
121 This aspect is used to gather information about a crate for use in rustfmt and perform rustfmt chec…
125 - `rustfmt_checks`: Executes `rustfmt --check` on the specified target.
127 The build setting `@rules_rust//:rustfmt.toml` is used to control the Rustfmt [configuration settin…
130 [cs]: https://rust-lang.github.io/rustfmt/
133 users may tag a target with `no-rustfmt` or `no-format` to have it skipped. Additionally,
138 doc = "The `rustfmt.toml` file used for formatting",
140 default = Label("//:rustfmt.toml"),
143 doc = "A process wrapper for running rustfmt on all platforms",
155 str(Label("//rust/rustfmt:toolchain_type")),
187 - `rustfmt_manifest`: A manifest used by rustfmt binaries to provide crate specific settings.
191 str(Label("//rust/rustfmt:toolchain_type")),
198 # rustfmt test runner.
246 doc = "A test rule for performing `rustfmt --check` on a set of targets",
249 doc = "Rust targets to run `rustfmt --check` on.",
257 doc = "The rustfmt test runner",
260 default = Label("//tools/rustfmt:rustfmt_test"),
268 "RUSTFMT": ctx.file.rustfmt.path,
278 all_files = [ctx.file.rustfmt] + ctx.files.rustc_lib
283 rustfmt = ctx.file.rustfmt,
296 doc = "A toolchain for [rustfmt](https://rust-lang.github.io/rustfmt/)",
308 "rustfmt": attr.label(
309 …doc = "The location of the `rustfmt` binary. Can be a direct source or a filegroup containing one …
321 toolchain = ctx.toolchains[str(Label("@rules_rust//rust/rustfmt:toolchain_type"))]
328 toolchain.rustfmt,
338 str(Label("@rules_rust//rust/rustfmt:toolchain_type")),