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 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

Nosferatul commented Aug 12, 2017

looks good to me 👍

@damngamerz damngamerz force-pushed the damngamerz:raiselog branch Aug 13, 2017
@damngamerz damngamerz force-pushed the damngamerz:raiselog branch 3 times, most recently Aug 15, 2017
@damngamerz damngamerz changed the title DocumentationAPI: Markers faulty message logging DocumentationAPI: Add `MalformedComment` Aug 15, 2017
@damngamerz damngamerz force-pushed the damngamerz:raiselog branch Aug 15, 2017
@damngamerz
Copy link
Member Author

damngamerz commented Aug 16, 2017

For reference coala/coala-bears#2001

@damngamerz damngamerz force-pushed the damngamerz:raiselog branch 2 times, most recently Aug 16, 2017
Copy link
Member

SanketDG left a comment

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

coalib/bearlib/languages/documentation/DocumentationComment.py Outdated
def __init__(self, message):
"""
Instantiate a MalformedComment, which contains the information about
the errors generated by DocumentationAPI.

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

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

coalib/bearlib/languages/documentation/DocumentationComment.py Outdated
:param message:
Contains the message about the error.
:param line:
Contains the related line no.

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

please be more explicit

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

what line no and all

coalib/bearlib/languages/documentation/DocumentationComment.py Outdated
def __init__(self, message, line):
"""
Instantiate a MalformedComment, which contains the information about
the errors generated by DocumentationAPI.

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

DocumentationAPI is a very internal term, explain this

coalib/bearlib/languages/documentation/DocumentationExtraction.py Outdated
if doc_comment:
return end_line, end_column, doc
else:
doc = MalformedComment(dedent("""\

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

doc? that's a bad variable name :P

tests/bearlib/languages/documentation/DocBaseClassTest.py Outdated
self.assertEqual(
[doc_comment.message, doc_comment.line],
[dedent("""\
Please check the docstring for faulty markers. A starting

This comment has been minimized.

@SanketDG

SanketDG Aug 16, 2017 Member

store the string already in a variable :P

@damngamerz damngamerz force-pushed the damngamerz:raiselog branch 4 times, most recently Aug 16, 2017
:param message:
Contains the message about the error.
:param line:
Contains the current line of the docstring where the error has

This comment has been minimized.

@SanketDG
Copy link
Member

SanketDG commented Aug 17, 2017

ack c5da58e bd80892

@SanketDG
Copy link
Member

SanketDG commented Aug 17, 2017

rebase and get it merged

damngamerz added 2 commits Aug 11, 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 #4548
@damngamerz damngamerz force-pushed the damngamerz:raiselog branch to 0f81583 Aug 17, 2017
@gureks
Copy link
Member

gureks commented Aug 17, 2017

@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
6 of 9 checks passed
6 of 9 checks passed
ci/circleci CircleCI is running your tests
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
codecov/project 100% (target 100%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
review/gitmate/commit This commit has no issues. :)
Details
review/gitmate/manual This commit was acknowledged.
Details
review/gitmate/pr This PR has no issues. :)
Details
@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
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.