[xwiki-devs] [proposal] Establish code style rule for trailing whitespace.
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's. Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required. /** * My Cool Method. * <----- trailing whitespace goes here. * @param something... */ WDYT? Caleb
+1 Thanks, Marius On 10/20/2010 03:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. *<----- trailing whitespace goes here. * @param something... */
WDYT?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Oct 20, 2010, at 2:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. * <----- trailing whitespace goes here. * @param something... */
WDYT?
Can you point out where in the javadoc spec it says there should be a trailing space after the "*"? If it's not in the javadoc then I don't agree that we should add trailing white spaces just because Eclipse doesn't support it or something like that. IDEA doesn't seem to add those spaces. Thanks -Vincent
On 10/20/2010 08:39 AM, Vincent Massol wrote:
On Oct 20, 2010, at 2:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. * <----- trailing whitespace goes here. * @param something... */
WDYT?
Can you point out where in the javadoc spec it says there should be a trailing space after the "*"?
I did not see any place and in fact java.lang.Boolean does not use this style. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14...
If it's not in the javadoc then I don't agree that we should add trailing white spaces just because Eclipse doesn't support it or something like that.
My only position is that I want something written down. If we can't agree in favor of whitespace and we can't agree against whitespace then I suppose the default must be "do what you want".
IDEA doesn't seem to add those spaces.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Oct 20, 2010, at 2:39 PM, Vincent Massol wrote:
On Oct 20, 2010, at 2:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. * <----- trailing whitespace goes here. * @param something... */
WDYT?
Can you point out where in the javadoc spec it says there should be a trailing space after the "*"?
If it's not in the javadoc then I don't agree that we should add trailing white spaces just because Eclipse doesn't support it or something like that.
IDEA doesn't seem to add those spaces.
Just to be clear: - I'd prefer never to have trailing spaces - I'm ok to accept that due to some IDE limitation we accept trailing spaces in empty javadoc lines - I don't want it to be enforced since I'm using a proper IDE and I don't want to have to refactor my code before committing it Thanks -Vincent
On 10/20/2010 02:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. *<----- trailing whitespace goes here. * @param something... */
WDYT?
+1, with the amendment that in javadocs it's not required, but allowed. This might cause a refactoring conflict: X commits a codestyle change removing the spaces, Y commits a codestyle change adding the spaces. Since I'm using git, and I always do "git add --interactive", I can filter out this kind of changes. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On 10/20/2010 11:12 AM, Sergiu Dumitriu wrote:
On 10/20/2010 02:00 PM, Caleb James DeLisle wrote:
I would like to propose establishing a documented rule for trailing whitespace which follows the current defacto standard laid out by the IDE's.
Trailing whitespace in java files is unacceptable except in an empty line in a javadoc comment in which case a single space is required.
/** * My Cool Method. *<----- trailing whitespace goes here. * @param something... */
WDYT?
+1, with the amendment that in javadocs it's not required, but allowed.
+1 same amendment, and I understand that's what Vincent wanted as well. I will document it now.
This might cause a refactoring conflict: X commits a codestyle change removing the spaces, Y commits a codestyle change adding the spaces. Since I'm using git, and I always do "git add --interactive", I can filter out this kind of changes.
participants (4)
-
Caleb James DeLisle -
Marius Dumitru Florea -
Sergiu Dumitriu -
Vincent Massol