Skip to content

Fix #2612 - hlint plugin - Apply fixities to parsed source before sending to apply-refact #2624

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

Merged
merged 9 commits into from
Jan 23, 2022

Conversation

eddiemundo
Copy link
Collaborator

@eddiemundo eddiemundo commented Jan 22, 2022

Turns out we weren't applying the standard fixities to the parsed source before handing it over to applyRefactorings'. Standalone hlint works because it calls the refactor executable which does apply the fixities before doing the refactor.

This also fixes a class of issues where applying the hlint refactor does nothing.

Closed the previous PR because I rebased wrong.

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

wow, good catch, many thanks for the fix

@jneira
Copy link
Member

jneira commented Jan 22, 2022

the new pedantic build in action

src/Ide/Plugin/Hlint.hs:55:1: error: [-Wunused-imports, -Werror=unused-imports] 

Error: The qualified import of ‘Refact.Fixity’ is redundant 

except perhaps to import instances from ‘Refact.Fixity’ 

To import instances alone, use: import Refact.Fixity() 

| 

55 | import qualified Refact.Fixity as Refact 

| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@jneira jneira added the merge me Label to trigger pull request merge label Jan 22, 2022
@michaelpj michaelpj removed the merge me Label to trigger pull request merge label Jan 22, 2022
@michaelpj michaelpj merged commit 96d2c04 into haskell:master Jan 23, 2022
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.

3 participants