Skip to content
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

DocumentationAPI: Add MalformedComment #4637

Merged
merged 2 commits into from Aug 17, 2017
Merged

Conversation

damngamerz
Copy link
Member

@damngamerz damngamerz commented Aug 11, 2017

MalformedComment is the new error handling mechanism
in DocumentationAPI. Which will help in yielding a
subsequent RESULT with a beautiful message in the bear.

Closes #4548

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@Nosferatul
Copy link
Member

looks good to me 👍

@damngamerz damngamerz force-pushed the raiselog branch 3 times, most recently from 2c0fac6 to a84dc8d Compare August 15, 2017 13:08
@damngamerz damngamerz changed the title DocumentationAPI: Markers faulty message logging DocumentationAPI: Add MalformedComment Aug 15, 2017
@damngamerz
Copy link
Member Author

For reference coala/coala-bears#2001

@damngamerz damngamerz force-pushed the raiselog branch 2 times, most recently from 147bc90 to c931457 Compare August 16, 2017 15:22
Copy link
Member

@SanketDG SanketDG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design good, please update docs and explain it now returns two types of objects in DocBaseClass.extract()

def __init__(self, message):
"""
Instantiate a MalformedComment, which contains the information about
the errors generated by DocumentationAPI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DocumentationAPI is a very internal term, explain on this, don't use this term

:param message:
Contains the message about the error.
:param line:
Contains the related line no.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please be more explicit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what line no and all

def __init__(self, message, line):
"""
Instantiate a MalformedComment, which contains the information about
the errors generated by DocumentationAPI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DocumentationAPI is a very internal term, explain this

if doc_comment:
return end_line, end_column, doc
else:
doc = MalformedComment(dedent("""\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc? that's a bad variable name :P

self.assertEqual(
[doc_comment.message, doc_comment.line],
[dedent("""\
Please check the docstring for faulty markers. A starting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

store the string already in a variable :P

@damngamerz damngamerz force-pushed the raiselog branch 4 times, most recently from 81ed786 to bd80892 Compare August 16, 2017 17:28
:param message:
Contains the message about the error.
:param line:
Contains the current line of the docstring where the error has
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SanketDG
Copy link
Member

ack c5da58e bd80892

@SanketDG
Copy link
Member

rebase and get it merged

@SanketDG SanketDG added process/approved The PR is approved and will be merged soon and removed process/pending review labels Aug 17, 2017
This fix was inappropriate which broke all corner cases.
DocumentationAPI doesn't care about docstrings which have
faulty markers.
This reverts commit 5805f97.
`MalformedComment` is the new error handling mechanism
in DocumentationAPI. Which will help in yielding a
subsequent `RESULT` with a beautiful message in the bear.

Closes coala#4548
@gureks
Copy link
Member

gureks commented Aug 17, 2017

ack 35750ae 0f81583

@rultor
Copy link
Contributor

rultor commented Aug 17, 2017

@rultor please merge

@gureks OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 0f81583 into coala:master Aug 17, 2017
@rultor
Copy link
Contributor

rultor commented Aug 17, 2017

@jeff Done! FYI, the full log is here (took me 2min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

DocumentationAPI Bug with C test cases.
6 participants