Open heueristik opened 2 months ago
it does not report about the files inside the tests folder because that's a different package (i.e. there is a package.juvix
inside).
I've tried juvix format --check
and it returns an error exit code but no output. That's the intended behaviour.
From juvix format --help
:
Given a file, it prints the reformatted source to standard output.
Given a project directory it prints a list of unformatted files in the project.
Given no argument it prints a list of unformatted files in the project which contains the current directory.
[..]
--check Do not print reformatted sources or unformatted file
paths to standard output.
So, if you want to get the list of unformatted files, you shouldn't pass --check
.
It would be nice if [..] juvix format --in-place would return a list containing the files that are [..] formatted in-place
I agree.
We could consider rethinking the cli interface to make it more intuitive.
One option would be to rename --check
to --silent
(or something similar). Or even remove the flag.
Steps to reproduce:
checkout this commit: https://github.com/anoma/juvix-anoma-test/commit/41b428ea7fca3e0414da8ea74af5817f0550d715
juvix clean --global && juvix clean && juvix dependencies update
juvix format --check
and observe that it does nothingjuvix-format --in-place
and observe that it change 2 out of 4 files (it didn't change the files in thetests
folder, which is unexpected)Moreover, it would be nice if, both,
juvix format --check
andjuvix format --in-place
would return a list containing the files that are malformatted or were formatted in-place, respectively.