If I run something like elm-format --validate . at the command prompt inside a typical Elm project directory, I get a flood of messages about Elm source files inside the elm-stuff directory. I can use elm-format --validate src to just check my own source files, but that doesn't work for stuff like example and test directories that don't have a separate src subdirectory.
Ideally, I think any elm-stuff directories should just be ignored - I'd love to able to just do stuff like elm-format --validate . in the parent directory of all of my various Elm project directories to search all of them simultaneously for files that have not been updated!
elm-stuff should be ignored, according to https://github.com/avh4/elm-format/blob/021b55a06c55a0cb72acc73a3f56968ab4098f76/src/ElmFormat/Filesystem.hs#L48
This is apparently a bug.
I should have mentioned that I'm on Windows using elm-format 0.7.0-exp. Is there something I can do to help debug? It does seem to ignore .git directories, so it's odd that it recurses into elm-stuff...
Is anyone able to still reproduce this?
I'm still getting the issue but then I'm still on 0.7.0-exp...is there a more recent version I should be trying?
0.7.0-exp is fine for checking on this, thanks.
At the moment, I haven't been able to get a windows environment going that can actually run Elm and elm-format, so if anyone can help debug, please do!
I'm wondering if it might be
messing up since Windows uses '\' instead of '/' as a directory separator...I can try to take some time to build and test elm-format on my own machine to check at some point.
Sounds like a good theory. Is it also recursing into node_modules and .git folders?
@ianmackenzie In about 15 minute from now, there should be a build of an attempted fix available. You should be able to download the binary from here: https://ci.appveyor.com/project/avh4/elm-format/build/1.0.259/artifacts
Can you try it out and see if it fixes the problem?
Argh, I wish I had noticed that comment before downloading Stack and compiling elm-format from source =)
But yes, I downloaded the new binary and that seems to have fixed the issue - thanks!
(And just for completeness, yes, it was indeed previously also recursing into node_modules and .git.)