-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Issue #5832: Add javadoc and xdoc Example for MemberName #6697
Conversation
93c28be
to
96084cb
Compare
Travis is having some issue right now with openjdk 9+, so you can ignore those errors. |
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.
item to improve:
@@ -56,16 +56,74 @@ | |||
* <pre> | |||
* <module name="MemberName"/> | |||
* </pre> |
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 put example of applyToXxxxxx
to configs and examples.
for example applyToPublic
and applyToProtected
to first example and applyToPackage
and applyToPrivate
to second example.
users love examples so mush that they skip reading of documentation at all. I think you noticed the same with you.
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.
I have made some little changes in second example.
However, I think in the first example, users could see how the default config works. In the third example, I put the applyToPublic & applyToPrivate which could combine with the applyToPackage & applyToProtected in the second example.
What do you think?
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.
Done.
@@ -56,16 +56,74 @@ | |||
* <pre> | |||
* <module name="MemberName"/> |
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 replace quotes with "
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 happens if no escaping done ?
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.
Thx, so do I need to change this one?
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 happens if no escaping done ?
I do not know. But it will be better if we use one style per file.
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.
My personal preference is to avoid escaping if possible, as it is made code less readable.
@rnveach , what is your position on this ?
It is better to make decision on this for future updates.
In this PR, let's escape, to be consistent.
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.
Done.
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 is your position on this ?
I have no real preference.
@pbludov has been escaping these in all his PRs and I mentioned in one if he wants this done everywhere, he should make it part of the test otherwise new committers won't do it. See #6662 (comment) .
What happens if no escaping done ?
Nothing as long as we escape the <
s are escaped. These were real "
for the longest time. You only really need to escape if you are using it inside another quote like an attribute or text area or such.
Edit: I was thinking this was the xdoc. I don't see how this can affect the javadoc at all, again as long as the <
s are escaped.
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.
I do not know.
Does it make sense to do massive search-replace to un escape double braces ?
7222a80
to
8201ee0
Compare
@romani So is there any other problem in this PR? |
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.
@pbludov , please finalize
src/xdocs/config_naming.xml
Outdated
private int NUM4; // violation, name 'NUM4' | ||
// must match pattern '^[a-z][a-zA-Z0-9]*$' | ||
} | ||
</pre> | ||
<p> | ||
An example of how to configure the check for names that begin with | ||
<code>"m"</code>, followed by an upper case letter, and then letters and |
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.
Description was not updated when applyTo
were added.
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.
Done.
* // must match pattern '^[a-z][a-zA-Z0-9]*$' | ||
* private int NUM4; // violation, name 'NUM4' | ||
* // must match pattern '^[a-z][a-zA-Z0-9]*$' | ||
* } | ||
* </pre> | ||
* <p> | ||
* An example of how to configure the check for names that begin with | ||
* {@code "m"}, followed by an upper case letter, and then letters and |
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.
same.
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.
Done.
8201ee0
to
c82df27
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.
OK to merge when CI passes.
c82df27
to
f3ba1b8
Compare
#5832