[DevExpress Support Team: CLONED FROM T557986: Cleanup / Format document removes unexpected code]
The combination of "Code cleanup" and "Format document" removes to much if "remove unused code" is active.
In this video you can see it removing an event hook and the complete EASYTEST directive: https://www.screencast.com/t/TdFv9IoMQe
In the example the event declaration contains an not implemented exception, so it´s not unused. But it gets removed.
It also removes the EASYTEST directive above the event hook.
Under some circumstances it removes the inside code of directives: https://www.screencast.com/t/8nphdrztQnaD If I uncheck "Format document" in the cleanup options, no unexpected code is removed.