-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
looks good to me 👍 |
2c0fac6
to
a84dc8d
Compare
MalformedComment
For reference coala/coala-bears#2001 |
147bc90
to
c931457
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.
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. |
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.
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. |
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.
please be more explicit
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 line no and all
def __init__(self, message, line): | ||
""" | ||
Instantiate a MalformedComment, which contains the information about | ||
the errors generated by DocumentationAPI. |
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.
DocumentationAPI is a very internal term, explain this
if doc_comment: | ||
return end_line, end_column, doc | ||
else: | ||
doc = MalformedComment(dedent("""\ |
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.
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 |
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.
store the string already in a variable :P
81ed786
to
bd80892
Compare
:param message: | ||
Contains the message about the error. | ||
:param line: | ||
Contains the current line of the docstring where the error has |
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.
ack c5da58e bd80892 |
rebase and get it merged |
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
MalformedComment
is the new error handling mechanismin 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
them.
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:
cobot mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!