-
Notifications
You must be signed in to change notification settings - Fork 580
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
bears/haskell: Add GhcModBear for syntax checking #1267
Conversation
Thanks for your contribution! Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.
As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well! |
alright there's a reason behind the travis error. You should try to pull our docker container and execute tests with and without your changes there, and see what's happening 👍 |
@Makman2 Is it because of my changes? I see this error in other pull requests as well :/ |
@Makman2 And, I'm not sure how to use docker container for carrying out the tests. :/ |
Actually I can't believe your changes are causing this, though they reoccur, so let's eliminate the probability that your code is the cause^^ Docker is some kind of a leightweight VM:
You get an interactive shell there. Then you clone coala and checkout your branch, install your new requirements, and execute tests -> |
r'(?P<message>.+)') | ||
class GhcModBear: | ||
""" | ||
Syntax checking with ghc for Haskell files. |
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.
think "ghc" should be enclosed in double backticks
Ah some problem with LanguageToolBear and InferBear.. It's just travis' problem. |
c9dc558
to
7cd564f
Compare
7cd564f
to
429f04a
Compare
|
||
@staticmethod | ||
def create_arguments(filename, file, config_file): | ||
return '-b', '. ', 'check', filename |
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.
what's the '. '
for?
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.
can you put a comment in the code please? otherwise people will just remove it. Also do we have a test that would fail if this isn't given?
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.
Ok I'll add a comment saying that :)
No, there is no test as such.
code and tests look really proper, just that |
429f04a
to
3909bed
Compare
The |
3909bed
to
46da83b
Compare
I have added the comment :) |
46da83b
to
8a734fe
Compare
I have modified a testcase to check for the Thanks! |
This is NOT a regex problem, but the output of ghc-mod differing :/
On my machine,
Since there is no universal output, it's better we don't test the |
can we test for |
Initially, I had put only
because there was tick ( |
8a734fe
to
c1a3bc5
Compare
4ac8fde
to
dbcbd74
Compare
I have added a vague test checking for |
please use the full URL in the shortlog, not just #..., otherwise it won't be linked in the git logs locally |
tempfile_kwargs={'suffix': '.hs'}) | ||
self.assertEqual(len(results), 1, str(results)) | ||
# to check for the seperator | ||
self.assertTrue((len(str(results[0].message).split('.')) >= 4)) |
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.
uhm this just checks that there are three .
s right? Can't we just do a simple assertIn('. '
to see that the space is there properly?
dbcbd74
to
245e80c
Compare
unack |
Add ghc-mod feature to coala for syntax checking for haskell files (.hs) Closes coala#297
245e80c
to
20f7a1a
Compare
I did use the full URL :/ It turns into #.. after I push @sils |
you can see if it's the full URL if yo hover over the message and see the tooltip :) |
ack 20f7a1a |
@rultor merge |
🎉 finally |
You have no idea how relieved I am! 😄 |
Add a new bear in Haskell, namely GhcModBear for syntax checking.
Closes #297