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

Add fourmolu code formatter #1334

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Add fourmolu code formatter #1334

merged 2 commits into from
Jan 17, 2023

Conversation

kderme
Copy link
Contributor

@kderme kderme commented Jan 11, 2023

Merge #1332 first

@kderme kderme requested a review from a team as a code owner January 11, 2023 15:01
@kderme kderme mentioned this pull request Jan 11, 2023
6 tasks

set -euo pipefail

fourmolu --indentation 2 --indent-wheres true --haddock-style single-line \
Copy link
Contributor

Choose a reason for hiding this comment

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

would a fourmolu.yaml config be clearer? would also permit to use fourmolu safely outside of this script.
Also cardano-ledger adopted fourmolu recently: https://github.com/input-output-hk/cardano-ledger/blob/master/fourmolu.yaml
so I'm wondering if a uniform fourmolu config across project would be easier for people working on multiple project?

Copy link
Contributor Author

@kderme kderme Jan 13, 2023

Choose a reason for hiding this comment

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

The config file definitely makes sence.
The only difference I see with leger is the record-brace-space, for which I use the default false
I'm ok with these diffs, so I'll adopt it

-        throwIO err404{errBody = encode err}
+        throwIO err404 {errBody = encode err}
-  toJSON failure@DbLookupPoolMetadataHash{} =
+  toJSON failure@DbLookupPoolMetadataHash {} =

@kderme kderme requested a review from a team as a code owner January 16, 2023 21:33
olgahryniuk
olgahryniuk previously approved these changes Jan 17, 2023
@kderme kderme merged commit 5aa5007 into master Jan 17, 2023
@iohk-bors iohk-bors bot deleted the kderme/fourmolu branch January 17, 2023 16:39
@kderme kderme mentioned this pull request Jan 17, 2023
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