-
Notifications
You must be signed in to change notification settings - Fork 157
Add fourmolu as formatter #2735
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
base: master
Are you sure you want to change the base?
Conversation
348bb5f
to
18d8cb1
Compare
Please exclude When adding support for new GHC version to clash it is very helpful to have them changed as little as possible. If there are actual problems with that code they should be fixed upstream. |
c2a673f
to
1172c0b
Compare
aebc056
to
b79af65
Compare
Thanks for all the hard work; it's hardly fun but very useful. Some initial feedback. I really like it if every commit passes CI. You first add the fourmolu formatting check to CI, and in a later commit make the existing code conform to that CI check. Could you reverse those so CI would also pass on the earlier commits? Furthermore, you add |
The goal of the commits is not to pass CI. It's to make fourmolu accept the file at all. To make CI pass I need to actually format the files and it will be the penultimate commit. Regarding formatting tests. I dislike adding those extensions wholesale to fourmolu since that means those extensions will be enabled for all other files as well. But I'm good with disable formatting for all tests as well. What do you think @martijnbastiaan? |
Ah, I think you misunderstood. I like it if every commit could pass CI. But you add the fourmolu check in CI before you make the code pass that check. I'm saying that I'd rather see that you first make the code pass the check and only in a later commit add the check itself. Because currently the commit which adds the fourmolu check will not pass CI. It's just an ordering thing, nothing has to change about the content. If you were to currently force-push this branch to only contain the first commit Add fourmolu as formatter, the CI that runs for this PR would fail, because it would fail the added CI check. For the purposes of bisection, I really like it if any commit passes any check we throw at it. |
I was suggesting making one step run fourmolu on all code except |
Keeping yet another place with default extensions doesn't seem right to me, so I'd vote for disabling formatting for it entirely. I'm very unhappy with the current state of |
There are a ton of file which won't pass through formatting yet. The main reason is CPP.
To make this reviewable I intend to make a formatting prepare commit per sub-project where I try to fix it(or ignore that specific file if necessary). Then once that is done I will make a wholesale formatting commit. This is done to ensure the changes I made to make formatting work won't drown out in changes done by the formatter.