-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adjustments to formatter #583
Conversation
a19a48d
to
1be7584
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that the two formatters are needed for imports organization? That seems cumbersome (because we will have to deal with potential quirks of both of them) and will have poor code editor integration. Can we avoid that?
Continuing from #582 (comment):
- Regarding import grouping, I think this should be achievable using fourmolu custom grouping: https://fourmolu.github.io/config/import-grouping/
- I propose to enable
ImportQualifiedPost
GHC extension incardano-api.cabal
file globally, to improve imports readability - especially when qualified are mixed with non-qualified. Thoughts? - We should mention usage of
fourmolu
inCONTRIBUTING.md
. One additional small thing - would you mind movingCONTRIBUTING.md
fromcardano-cli
tocardano-api
repo, and then linking from cli to here?
The grouping feature doesn't seem to work in fourmolu, it says unreleased in the documentation, so I think it didn't make it to a release yet. |
1be7584
to
15c0891
Compare
15c0891
to
f2363ec
Compare
f2363ec
to
10c478e
Compare
Oh you are right. It didn't make it to the latest release. Thanks for checking that. |
I'm not 100% sold on using two formatters at the same time. We will have to deal with the potential issues of both, their two configuration formats, their two slightly different usages. But if you see that's the best option we have at the moment, I'm ok with it 👌🏻. And having a formatting script executing both is then a must. 😃 |
10c478e
to
9c3e87e
Compare
9c3e87e
to
e28fadb
Compare
Changelog
Context
This is a follow up PR for #582, and it aims to address some of the suggestions provided post-merge.
How to trust this PR
Probably check that the hook works for you. Also that you are happy with the changes and configuration, and that the CI passes.
Probably good idea to look at the commits separately.
Checklist