Are there any utilities that reformat Delphi code ?

EDIT

I am using Delphi 2006

Some feedback

Thanks to all that answered this question

I have been using the JCF code formatter - it works well and my code is been formated to Object Pascal Style Guide


You can try the "Jedi code Format". See more information here: http://jedicodeformat.sourceforge.net/

The formatting engine of DelForExp has been integrated into the code base of GExperts. An experimental version of GExperts including a "Code formatter" here:
http://blog.dummzeuch.de/experimental-gexperts-version/

Separate information/downloads for DelForExp here.

Regards.


I have been for some time releasing experimental GExperts versions that include the code formatter formerly known as DelForEx with some improvements and fixes. The latest release is from 2020-10-23 and supports the following Delphi versions:

  • Delphi 6 to 7
  • Delphi 2005 to 2010
  • Delphi XE
  • Delphi XE2 to XE8
  • Delphi 10 to 10.4
  • Delphi 11 (Danger, Alpha version for now 2021-10-24)

Please note, though, that I am using it only with Delphi 2007, so the other versions may have unknown bugs. Also, not all language improvements of later Delphi versions will work, e.g. nested types, generics and anonymous methods.

see gexperts.dummzeuch.de for details.

btw: Any help improving the formatter, especially adding the new language constructs would be appreciated. The source code can be downloaded from the subversion repository linked from my homepage.


I found this: JEDI Code Format