|
Usage |
Pretty is the SmallEiffel Pretty Printer for Eiffel source files. For all classes given as arguments, pretty looks for the corresponding file using the same algorithm as finder. All the corresponding files are reformatted in a `pretty' way.
For example, provided that you have write permission for the corresponding class file, you can reformat the source file of class HELLO_WORLD using the command:
pretty hello_worldThere are four modes of pretty printing: -zen, -default, -end and -parano mode. Only one mode can be selected and mode -default is the default.
Options for pretty printing |
Security and BackUp file |
For the security of source files, a backup file is created before the new file is written to disk. (The system, or pretty itself, might crash while the new file is being written).
The backup file name is foo.bak when the 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, pretty exits with an error message.
To be sure that the pretty printing has been done properly, the output file is parsed again. Even if the second parsing gives no errors, the backup file is NOT removed. This allows you to recompile your Eiffel code to check the new file before removing the backup file manually.