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

Make unittest of rules works #4

Merged
merged 6 commits into from
Jan 29, 2017
Merged

Conversation

chuck-lee
Copy link
Contributor

No description provided.

kunaltyagi
kunaltyagi previously approved these changes Jan 14, 2017
Copy link
Owner

@kunaltyagi kunaltyagi left a comment

Choose a reason for hiding this comment

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

Would using a raw string be better? (Just asking)
With reference to #219d53 commit (Fix string syntax error)

@kunaltyagi kunaltyagi dismissed their stale review January 14, 2017 01:16

Didn't realize that Reviews are not per commit, but per pull request


token = lexer.GetNextTokenSkipWhiteSpace()

error(lexer)
Copy link
Owner

Choose a reason for hiding this comment

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

Irrelevant line? (L72: error(lexer)) since while True: is never broken from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yes.
I will remove L72.

@@ -44,13 +44,13 @@ def RunRule(lexer, fullName, decl, contextStack, context) :
if ext == ".h" :
upperBlock = contextStack.SigPeek()
# modification to make doxygen compulsory for even private functions
if upperBlock is None: # != None: and upperBlock.type == "CLASS_BLOCK" and upperBlock.additional == "PRIVATE":
if upperBlock is not None and upperBlock.type == "CLASS_BLOCK" and upperBlock.additional == "PRIVATE":
Copy link
Owner

Choose a reason for hiding this comment

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

Won't this result in failure in the test case where the function is private? (I'm unable to run tests on my mobile 😄 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test 4 has private function without comments, and the test passes(well, in my environment :P).
I think it would be nice that you can run the tests as double check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I misread the description in file header, because the private function without comment is put in the "Good" block.
So doxygen comments are also required for private function, right?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, that is the intent. All class members (public, private or protected) and functions should be documented.

@@ -107,7 +107,7 @@ class A {
void ~A();
}
""")
assert CheckErrorContent(__name__)
assert CheckErrorContent(__name__)
def test4(self):
self.Analyze("thisfile.h",
"""
Copy link
Owner

Choose a reason for hiding this comment

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

This test should give an error (since B and C are not documented)??

"""
class J {
protected :
/// HELLO
Copy link
Owner

Choose a reason for hiding this comment

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

It would be nice if the file introduction contained the fact that /// comments are also not valid. Tests 9-12 all are based on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will refine the file introduction!

@kunaltyagi
Copy link
Owner

@chuck-lee Cheers! Apart from a few points I've mentioned above, I see no issue in merging this pull (as soon as I can run the tests).

@chuck-lee
Copy link
Contributor Author

@kunaltyagi Thanks for your feedbacks, I have updated my patch!

Copy link
Owner

@kunaltyagi kunaltyagi left a comment

Choose a reason for hiding this comment

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

Merged!

@kunaltyagi kunaltyagi merged commit eff3f82 into kunaltyagi:master Jan 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants