-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Doctest comment parsing using module annotations in Eval Plugin #1232
Doctest comment parsing using module annotations in Eval Plugin #1232
Conversation
I think it's done for line comments (not blocks yet), and it seems that the infinite loop occurring when one toggles block comments, as described in #1214, seems gone with the current change. |
Hmm, also |
Fmm, I assume that |
and what about disable haddock for |
Yes, it must be the easiest way to try! |
In fact when i wrote the rule i was about to disable haddock, but as hlint worked without doing it i decided to let is as is now |
To comply with the current Eval Plugin behaviour, I decided to limit the indentation level to be processed as Eval command so that:
This doesn't cover modules with the base indentation level strictly greater than those specified above, though it might rarely occur. |
plugins/hls-eval-plugin/test/Eval.hs
Outdated
goldenTest mdl | ||
#if __GLASGOW_HASKELL__ >= 808 | ||
, testCase "CPP support" $ goldenTest "TCPP.hs" | ||
, | ||
#if mingw32_HOST_OS |
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.
Maybe we could add a dedicated function to mark tests broken for windows like https://github.com/haskell/haskell-language-server/blob/master/test/utils/Test/Hls/Util.hs#L119
We can use extra
function isWindows
: https://hackage.haskell.org/package/extra-1.7.9/docs/System-Info-Extra.html#v:isWindows
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.
Anyway i will try to take a look in my local windows env
…skell-language-server into eval-comments-from-parsed-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.
Looks good to me, and tests are the evidence it improves the actual situation.
I would like to have some other approve before merge though.
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 think it's in a good shape.
This PR aims at rewriting existing custom comment parser in Eval plugin with
getParsedModuleWithComments
, which is introduced recently.This should address #1214, #1231 and #1258.
closes #1214, closes #1258