rust/rustfmt.toml
Nicholas Nethercote 4702a1c345 Fix comments.
Some are too long, some aren't complete sentences, some are complete
sentences but don't bother with an upper case letter at the start. All
annoying and hurt readability.
2024-05-28 19:28:21 +10:00

49 lines
1.5 KiB
TOML

# Run rustfmt with this config (it should be picked up automatically).
version = "Two"
use_small_heuristics = "Max"
merge_derives = false
# Files to ignore. Each entry uses gitignore syntax.
ignore = [
"/build/",
"/*-build/",
"/build-*/",
"/vendor/",
# Tests for now are not formatted, as they are sometimes pretty-printing constrained
# (and generally rustfmt can move around comments in UI-testing incompatible ways).
"/tests/*",
# But we still want to format rmake.rs files in tests/run-make/ so we need to do this
# dance to avoid the parent directory from being excluded.
"!/tests/run-make/",
"/tests/run-make/*/*.rs",
"!/tests/run-make/*/rmake.rs",
# Do not format submodules.
# FIXME: sync submodule list with tidy/bootstrap/etc
# tidy/src/walk.rs:filter_dirs
"library/backtrace",
"library/portable-simd",
"library/stdarch",
"compiler/rustc_codegen_gcc",
"src/doc/book",
"src/doc/edition-guide",
"src/doc/embedded-book",
"src/doc/nomicon",
"src/doc/reference",
"src/doc/rust-by-example",
"src/doc/rustc-dev-guide",
"src/llvm-project",
"src/tools/cargo",
"src/tools/clippy",
"src/tools/miri",
"src/tools/rust-analyzer",
"src/tools/rustc-perf",
"src/tools/rustfmt",
# These are ignored by a standard cargo fmt run.
"compiler/rustc_codegen_cranelift/scripts",
"compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs", # uses edition 2024
]