It is currently 14 Sep 2025, 20:11
   
Text Size

r9825 Discussion

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

r9825 Discussion

Postby Braids » 20 Aug 2011, 18:42

@Dave, i think this pattern allows spaces in blank lines. should it not be the following instead?

from
<property name="format" value="[^\*]\s+$"/>

to
<property name="format" value="(^|[^\*])\s+$"/>
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time

Re: r9825 Discussion

Postby jendave » 20 Aug 2011, 22:32

Braids wrote:@Dave, i think this pattern allows spaces in blank lines. should it not be the following instead?

from
<property name="format" value="[^\*]\s+$"/>

to
<property name="format" value="(^|[^\*])\s+$"/>
Good catch. Checked in patch r9833.
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

Re: r9825 Discussion

Postby Braids » 20 Aug 2011, 23:08

edit: thank you.

i was just thinking, it still ignores spaces after any asterisk, not just one in javadoc. . . but then i realized. last time i used CheckStyle, it didn't like lines ending with operators like multiplication asterisk. so i don't think we need to change it.

yes, it definitely works:
Code: Select all
int x = 2 *{space}
    2;
CheckStyle says '*' should be on a new line. :D

oh, wow! your pattern only allows one space after an asterisk. i wonder why? oh, because in "whatever*{space}{space}", the first space matches the [^\*] in the pattern, and the second one matches the \s+. i like it this way. . . Eclipse only puts one space there, anyway.

Code: Select all
1:/*
2: *{space}
3: *{space}{space}
4: */
CheckStyle says line 3 has trailing spaces! i'm getting way too excited about this. =P~
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 46 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 46 users online :: 0 registered, 0 hidden and 46 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 46 guests

Login Form