-
Notifications
You must be signed in to change notification settings - Fork 486
Run fourmolu against plutus-tx-plugin
files
#7105
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
] | ||
, goldenPirReadable "coverageCode" boolOtherFunction ] | ||
coverage = | ||
testNested "Coverage" . pure $ |
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.
These test are failing:
Coverage
9.6
Application heads and line coverage
noBool
correct application heads: OK
correct line coverage: FAIL
test/Plugin/Coverage/Spec.hs:84:
Lines [31] are not covered by [(30,30)]
Use -p '/noBool.correct line coverage/' to rerun this test only.
boolTrueFalse
correct application heads: OK
correct line coverage: FAIL
test/Plugin/Coverage/Spec.hs:84:
Lines [34] are not covered by [(33,33),(33,33),(33,33),(33,33)]
Use -p '/boolTrueFalse.correct line coverage/' to rerun this test only.
boolOtherFunction
correct application heads: OK
correct line coverage: FAIL
test/Plugin/Coverage/Spec.hs:84:
Lines [37,40,41,42] are not covered by [(36,36),(39,39),(39,41),(39,41),(40,40),(40,40),(40,40),(40,40),(41,41),(45,45),(45,45),(45,45),(45,45),(45,45),(45,45)]
Use -p '/boolOtherFunction.correct line coverage/' to rerun this test only.
boolQualifiedDisappears
correct application heads: OK
correct line coverage: FAIL
test/Plugin/Coverage/Spec.hs:84:
Lines [49] are not covered by [(48,48),(48,48)]
Use -p '/boolQualifiedDisappears.correct line coverage/' to rerun this test only.
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.
Line numbers here are changed as fourmolu shifted the lines
b040c32
to
1dd31b6
Compare
{- Note [Non-regular data types in tests] | ||
A non-regular data type, a.k.a. a nested data type is, quoting "Nested Datatypes" by Richard Bird | ||
and Lambert Meertens, a parametrised data type whose declaration involves different instances of the | ||
accompanying type parameters. Such data types cannot be encoded with regular @fix :: (* -> *) -> *@ | ||
and require our fancy @ifix@ business, hence they make for good tests, which is how we have so many | ||
of them. | ||
-} |
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.
This one too, we need to fix it.
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.
99% good, but some comments got detached from their bindings and floated to the top of a module in one file.
1dd31b6
to
05dbce5
Compare
Turns out there is a bug in ourmolu/fourmolu that makes all comments get pushed to the very top if there's a OPTIONS_GHC pragma in the middle of the code. Found a workaround: one can wrap the pragma to disable fourmolu like following:
|
05dbce5
to
86e949f
Compare
Do you mind linking a bug in the fourmolu repository in the comment in our code so that we can remove the workaround once its fixed? |
86e949f
to
2a7d9ff
Compare
2a7d9ff
to
7bad870
Compare
Formatted
plutus-tx-plugin
files with fourmolu and stylish haskell(through pre-commit hook)