Home › Forums › Development › Coders Supporting Coders › Reply To: Coders Supporting Coders
Any coder knows that case: you download an interesting source, double click, and … horror formatting! This is when uncrustify enters the stage. Uncrustify is a configurable open source C++ code beautifier – see here: http://uncrustify.sourceforge.net/
I’ve been asked by PM for my uncrustify MQL settings file. Currently I’m running version 0.6.0. You’ll find a newer version on their sourceforge site, but I included the binary I’m running in that zip archive to avoid possible compatibility issues.
After unpacking in a folder of your choice (create a new one!), first have a look in files sx_*.txt and edit them according to your personal preferences. To check it, copy a poorly formatted MQL source to file in.mq4 and save it. Then run the batch file and open the new file created, result.mq4.
Note that the function header you defined will only be set if there’s no function header present.
The settings I find useful are defined in file simplex.cfg. Note: just my personal preferences – change it if you like to do so!
Look at the pics attached for an example of before and after.
That’s all – have fun!
Attachments:You must be logged in to view attached files.
A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)