JuliaFormatter.jl
JuliaFormatter.jl copied to clipboard
Put quotes around nothing
The documentation says that we need always_for_in = nothing to disable it, but this is not true, what we need is always_for_in = "nothing". I've changed the documentation to match the code, and also the style file pretty.jl which was broken.
in what situation does this come up? Config from a .JuliaFormatter.toml file?
Indeed, put that into .JuliaFormatter.toml, call format, and see it fail.
ahh ic. In that case I'm rather see if we can get this worse as is with some additional parsing handling of the TOML file
My syntax highlighting really doesn't like "nothing" without the quotation marks in a TOML file, so maybe this violates the format specification?
Yeah, that's invalid TOML. Should really be a string imho.
https://github.com/domluna/JuliaFormatter.jl/blob/master/src/JuliaFormatter.jl#L487-L493
ok so this would already work if the value is "nothing" so we don't need to update anything besides documentation can we change the PR to do that instead.
That's what the PR is doing.
That's what the PR is doing.
it's changing it to "nothing" but during parsing when "nothing" is written in the TOML file it will be converted to nothing, so we don't need to change the code implementation. What I was referring to would be a note that says the TOML file should be
always_for_in = "nothing"
and not
always_for_in = nothing
I know, I'm not changing the code implementation, I'm only changing the documentation (and the style file pretty.jl).
Nevermind then.