indentation in fmt
the fmt subcommand is not checking the indentation correctly. It seems to think that indentation should be 4 spaces.
The tests in tests/fmt.rs all use 4 spaces e.g. lines 33 and 34
However run on this project's justfile will error on every rule
$ just --fmt --check --unstable
t := "hello"
+
# list
default:
- @just --list --color never | sed "/default/d"
+ @just --list --color never | sed "/default/d"
Not sure this is a bug. By default, rustfmt is opinionated on indentation, and I think it's reasonable to expect Just's formatter to be as well. What behavior are you expecting?
just allows tabs as indent as shown in its own justfile.
I would expect the formatter to use tabs if the original uses tabs.
I would expect the formatter not to change things in the actual project.
If not the README etc should make it clear that spaces is the expected format and tabas are an error.
I note that the author says it is a bug in https://github.com/casey/just/issues/1684 So this is a duplicate.
Close as duplicate