I am trying to create a rule in the Eclipse Checkstyle plugin that will check whether the while portion of a do..while statement is on the same line as the end bracket. 

My goal is to get the following to be valid:

```
int count = 0;
do {
    System.out.println(count);
    count++;
} while (count < 10);

```

and the below must be invalid:

```
int count = 0;
do {
    System.out.println(count);
    count++;
} 
while (count < 10);

```

I have tried doing this by creating a [Right Curly Brace placement](http://checkstyle.sourceforge.net/config_blocks.html#RightCurly) rule (under Blocks) for the do keyword, specifying the "same" option. However, running checkstyle throws the error `} should be on the same line` for both of the above examples. 

Strangely enough, changing the option to "alone" causes both examples to be parsed successfully. Is there another way to enforce the above rule?