pretty is the Liberty Eiffel pretty-printer (code beautifier) for Eiffel source files. In a normal installation, it is invoked by the command se pretty.
se pretty [options] <source_file>
source_file argument must be some existing Eiffel source file path as for example
One can specify more than one file name at a time in order to apply the pretty command to all the specified files. All the corresponding files are rewritten in a pretty way.
There are four modes of pretty reformatting: -zen, -default, -end and -parano mode. Only one mode can be selected and -default is the default mode.
|| Display a short summary of the command line syntax, as well as a complete list of |
||Display (an enormous amount of) information during the process: a complete list of files loaded, and so on.|
||Display the Liberty Eiffel version number.|
||Display warning messages about non-compliance with Eiffel style rules.|
||Suppress all warning messages.|
||Display messages in a compact format suitable for processing by tools such as Emacs' Flymake mode.|
||Produce as little as possible (i.e. very compact output). No end mark comment for routines, no end comments for statements (if, inspect, debug, ...).|
||The default mode. This is close to what we are using for our library.|
|| The same format as |
|| Same format as |
||Suppress output for all warning messages (error messages are still printed).|
Security and Backup File
For the security of your sources files, a backup file is created before writing the new file. The backup file name is
"foo.bak" when source file name is
"foo.e". The backup file is written in the same directory as the source file.
If an old backup file already exists before pretty printing, the pretty command exits with an error message.
To be sure that the pretty-printing is correct, the output file is parsed again. Even if the second parsing gives no errors, backup file is not removed. Thus you can recompile and test your Eiffel program to check that the beautified files did not break anything, before removing the backup files yourself.