Running uncrustify more than one time on some files results in additional changes.
In some cases (flipflopcppcmt.cpp - attached) the same change will be implemented or reversed every time the file is processed.
We would like to automate the use of uncrustify when files are checked into our configuration management system - but code review becomes problematic as uncrustify will reformat code that was untouched.
I have attached some example files that exhibit this behavior along with our uncrustify configuration file.
Well!
You can get a work-around for testb.h by changing the placement of the comment
// Comments
before the class statement.
You can almost solve the problem with comment with
align_right_cmt_span=1
The case testa.cpp is still a problem. I am working on it.
Happy to see this getting some attention! We greatly appreciate it!
Most of these can be solved on our end by scripting the formatter to run repeatedly until the file stabilizes... not ideal, but workable. The ones that change forever are less palatable.
I'm attatching another example file which illustrates another, similar, issue in an instance where there are many extra parenthesis. Uncrustify will only remove one pair each time it is run on the file....
We have migrated the bug to:
https://github.com/uncrustify/uncrustify/issues/685