cabalfmt: use filepath arg instead of stdin #424
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
disclaimer: idk what I'm doing
my reasoning:
I wanted to let cabal-fmt auto-fill a field, but that didn't seem to be working due to current configuration feeding the content to cabal-fmt through stdin, so I wish to change it.
By default it seems neoformat uses a temporary path when passing file path by arg. That's also not good enough as cabal-fmt needs access to the project location.
I assume that the reason for using a temp path is that some tools make in-place changes. cabal-fmt only does so when asked to with
-i, --in-place
does this break stuff for others?: I wouldn't know.
feel free to discard or whatever. I just made what seemed like an improvement to me, and figured out how to make the pull request.