Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ormolu fix #257

Merged
merged 7 commits into from
Jul 31, 2020
Merged

Ormolu fix #257

merged 7 commits into from
Jul 31, 2020

Conversation

sureyeaah
Copy link
Contributor

@sureyeaah sureyeaah commented Jul 30, 2020

This PR addresses some inconsistent use of 0/1-indexing in the formatting code. The main issue was in diffOperationToTextEdit which is only used by the Ormolu plugin. Also added import lists to formatting testdata for more robust testing.

fixes #213

@sureyeaah sureyeaah marked this pull request as draft July 30, 2020 12:04
@sureyeaah sureyeaah marked this pull request as ready for review July 30, 2020 13:29
The original lineno extracted from the Addition DiffOperation needs
to be increased by 1.
We were taking max of l and sl but the position of an insertion in
the newer document is irrelevant since the edits will be applied
from bottom to top.
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@georgefst georgefst mentioned this pull request Jul 31, 2020
@lukel97 lukel97 merged commit 5163c41 into haskell:master Jul 31, 2020
pepeiborra pushed a commit that referenced this pull request Dec 27, 2020
This does not yet take advantage of any new features but we should at
least be able to benefit from bugfixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency in Ormolu formatting
3 participants