From b5feb79a7c50a5fce8f215a5e52ae14b1a442db8 Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Wed, 8 Oct 2025 17:40:31 +0200 Subject: [PATCH] style: format entire repo by default We want all Rust and Python files formatted, and making formatting behavior dependent on the directory `style.fish` is called from can be counter-intuitive, especially since `check.sh`, which also calls `style.fish` is otherwise written in a way that allows calling it from arbitrary working directories and getting the same results. Closes #11925 --- build_tools/style.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_tools/style.fish b/build_tools/style.fish index 6f6b18c16..f84bc8a68 100755 --- a/build_tools/style.fish +++ b/build_tools/style.fish @@ -44,7 +44,7 @@ if test $all = yes end end set fish_files $workspace_root/{benchmarks,build_tools,etc,share}/**.fish - set python_files . + set python_files $workspace_root else # Format the files specified as arguments. set -l files $argv @@ -101,7 +101,7 @@ end echo === Running "$green"rustfmt"$normal" if set -l -q _flag_check if set -l -q _flag_all - if not cargo fmt --check + if not cargo fmt --all --check echo $red"Rust files are not formatted correctly."$normal exit 1 end @@ -115,7 +115,7 @@ if set -l -q _flag_check end else if set -l -q _flag_all - cargo fmt + cargo fmt --all else if set -q rust_files[1] rustfmt $rust_files