-
Notifications
You must be signed in to change notification settings - Fork 14
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
Apply stylish-haskell
to project
#69
Conversation
0b0c704
to
862e299
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.
Thanks for that! I think you can make this job in the stylish workflow mandatory now: https://github.com/input-output-hk/cardano-cli/actions/runs/5508573193/workflow?pr=69#L51 (can be a part of this pr)
EDIT: or not, there seem to be some issues with CPP extension: haskell/stylish-haskell#178
cardano-cli/app/cardano-cli.hs
Outdated
|
||
import Control.Monad.Trans.Except.Exit (orDie) |
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.
Doesn't this break the #ifdef
statement?
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.
Good catch! Seems like a known issue with stylish haskell 😞 haskell/stylish-haskell#178
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.
Good point. We can work around this with a proxy module.
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.
Files that contain CPP will be skipped in the stylish-haskell
check.
fe05c4d
to
5a93d23
Compare
1723170
to
d355511
Compare
d355511
to
e6a8612
Compare
Changelog
Context
PRs tend to be a lot bigger than they need to be because
stylish-haskell
rules as to fix imports and the code is full of imports that haven't been fixed yet.We only use
stylish-haskell
to format imports. It's probably better to get all the pain out of the way by applying thestylish-haskell
rules across the entire project so that future PRs can be smaller.Checklist
See Runnings tests for more details
CHANGELOG.md
for affected package.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7
Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.