do not revert Fourmolu magic comments to Ormolu form#90
Merged
georgefst merged 1 commit intofourmolu:masterfrom May 20, 2021
Merged
do not revert Fourmolu magic comments to Ormolu form#90georgefst merged 1 commit intofourmolu:masterfrom
georgefst merged 1 commit intofourmolu:masterfrom
Conversation
Collaborator
|
Yeah, this is actually a better idea! |
wldhx
pushed a commit
to wldhx/fourmolu
that referenced
this pull request
Jul 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #70.
After looking at the code I've decided not to add another option, and not to track which of the comments was used to disable the formatter. I just treat the two styles of comments as equivalent (e.g. after using
{- ORMOLU_DISABLE -}we may use{- FOURMOLU_ENABLE -}to re-enable formatting), but I do not change the style of the comment used in the original file.Adding an extra option just for this seemed weird. It's easy, but it adds much noise.
Tracking could be useful in some scenarios, but do we really need this?
This solution is simple, keeps Ormolu compatibility and is consistent with the current behavior.
However, if you think it's wrong this way, feel free to close the PR.