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

Reduce the number of ad-hoc helper test functions in refactor plugin tests #4027

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Jan 30, 2024

I'd like to add couple of reproducers for refactor plugin issues that annoy me in my daily work.
But the existing tests trigger my OCD.
It seems that everyone who added tests came up with their own set of helper functions and shortcuts 😄

This PR shouldn't change the coverage, but it partially reduces the chaos by making the tests reuse smaller number of simple test helper functions.
More improvements could be done, but perfect is the enemy of good..

@@ -9,7 +9,6 @@
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This option is no turned on by default via common warnings import in haskell-language-server.cabal.

@jhrcek
Copy link
Collaborator Author

jhrcek commented Jan 30, 2024

Huh, almost no tests were executed 🤔 is this something that's going to be resolved in #4024?

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.

Changes look good to me, but the CI is confusing me right now.

@michaelpj
Copy link
Collaborator

It seems that everyone who added tests came up with their own set of helper functions and shortcuts

It's a huge mess. Tidying that up would be a great blessing!

@jhrcek jhrcek force-pushed the jhrcek/refactor-plugin-unify-tests branch from cc04024 to 2b4074e Compare January 31, 2024 15:35
@jhrcek jhrcek force-pushed the jhrcek/refactor-plugin-unify-tests branch from f5374b9 to f26d13a Compare February 1, 2024 12:38
@michaelpj michaelpj added the merge me Label to trigger pull request merge label Feb 1, 2024
@mergify mergify bot merged commit 70dd21e into haskell:master Feb 1, 2024
41 checks passed
@jhrcek jhrcek deleted the jhrcek/refactor-plugin-unify-tests branch February 2, 2024 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants