MantisBT - KWStyle
View Issue Details
0009938KWStylepublic2009-11-20 21:362009-11-21 18:49
Jean-Christophe Fillion-Robin 
Julien Jomier 
normalminoralways
resolvedfixed 
0009938: Comment having only one parenthesis following by a for loop spread over two line will cause ident problems
The following code will cause indent problems:

int main(int argc, char** argv)
{
  // Comment with only one parenthesis (

  for (i = begin(); i < 10;
       i++)
    {
    // blah blah
    }
}

Running:

KWStyle -v -xml MyAwesomeBug.kws.xml CommentWithOnlyOneParenthesisIndentBug.cxx

Output:

Processing CommentWithOnlyOneParenthesisIndentBug.cxx
Error 0000012 (12) Indent is wrong 7 (should be 2)

See enclosed files:

A possible to trick:
  - Close the parenthesis in the comment

OR

Ident as requested:

int main(int argc, char** argv)
{
  // Comment with only one parenthesis (

  for (i = begin(); i < 10;
  i++)
    {
    // blah blah
    }
}
No tags attached.
cxx CommentWithOnlyOneParenthesisIndentBug.cxx (325) 2009-11-20 21:36
https://public.kitware.com/Bug/file/2679/CommentWithOnlyOneParenthesisIndentBug.cxx
xml MyAwesomeBug.kws.xml (650) 2009-11-20 21:37
https://public.kitware.com/Bug/file/2680/MyAwesomeBug.kws.xml
Issue History
2009-11-20 21:36Jean-Christophe Fillion-RobinNew Issue
2009-11-20 21:36Jean-Christophe Fillion-RobinFile Added: CommentWithOnlyOneParenthesisIndentBug.cxx
2009-11-20 21:37Jean-Christophe Fillion-RobinFile Added: MyAwesomeBug.kws.xml
2009-11-21 18:48Julien JomierStatusnew => assigned
2009-11-21 18:48Julien JomierAssigned To => Julien Jomier
2009-11-21 18:49Julien JomierNote Added: 0018508
2009-11-21 18:49Julien JomierStatusassigned => resolved
2009-11-21 18:49Julien JomierResolutionopen => fixed

Notes
(0018508)
Julien Jomier   
2009-11-21 18:49   
Fixed in SVN. I'll check tomorrow's dashboard to see if that didn't break any other tests